Jump to content

W3 PHP File Upload Source Directories


PShannon

Recommended Posts

I have used the W3 template to produce a script that uploads image changes to a directory on my server, updates the URL in my database and logs the event. Works beautifully IF the  source folder is:

\Pictures or \Pictures\Personal

But fails if it is any other source folder, even the peer folder \Pictures\BarImages

Why?

 

Link to comment
Share on other sites

Then, you'll need to define the directory dynamically.

You'll probably need to post the relevant part of the code, you're actually using, to get the more help.

 

Link to comment
Share on other sites

That's why you might like to learn more about code so you can change it when you need to.   Else, you can get stuck with someone else's code that was created for a purpose that's not entirely appropriate for your purpose.  

That means lots and lots of trials.

Edited by niche
Link to comment
Share on other sites

I've been doing this since 1966 and I build stuff quick and fast with patterns, components, templates, borrowed code or whatever gets me to where I want to be as fast as possible and I have no problem with tweaking code, but then again, my question had nothing to do with code. You didn't read it and if you did, you certainly didn't understand it. 

You did not contribute a single word responding to my inquiry. You just decided to lecture a guy you didn't know about what he needed.

Now, please go away. You have nothing to contribute.

Link to comment
Share on other sites

Right, it has nothing to do with coding, its magic! Sorry! You are on the wrong forum try https://blackwitchcoven.com/

If it was coding and you actually provided the code, we might have been able to help, but a vague question will result in a multitude of possible answers of which the most likely answer is its pointing to the wrong directory, it can't find what it is coded to look for, so it fails. But! All this nothing you want to hear so i will now depart, Abracadabra!

  • Like 1
Link to comment
Share on other sites

No! I didn't mention a specfic folder therefore whatever number of folders you have does not matter, its the folder you are trying to target. Again! We can't answer you correctly until we see the code. The code you linked to goes to a specific folder, you to create that folder, how do you change it to upload to another folder? Do you select from dropdown list, is it separated so each upload is to a specific folder? Is each parent folder saved to database along with image? We don't know, you are the one whose been cut pasting code without possible understanding how it work, we don't know, because there is no code to determine why it fails. We don't have powers to magically identify the problem. I mean have you ever been to garage with a photo of your car and said this is my car, there's a banging noise coming from, i have spent many building this car but i can't figure whats causing the banging, tell why its banging?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...