• Can someone please tell me how to add the upload function to my blog? I am not trying to upload files to my blog posts. WordPress already does that quite well. What I am trying to do is allow visitors of my blog to upload files to a folder on my server.

    What I have been trying so far, is to add a generic script to a PHP widget in a sidebar on my blog. I have been able to add the buttons, which is HTML, and then the php code. When you click upload, it appears as though it’s uploading but it doesn’t get saved to the folder I am specifying.

    I have a half a$$ed understanding of the php script I am running. I understand that it uploads to a temporary folder, then changes the file name and moves it to the specified folder. But somewhere, something is messing up.

    I have been trying to do all kinds of stuff to get it going properly. I’m not sure where exactly the problem is. I also don’t understand the default file structure of my wordpress installation. All of the tutorials for the php upload function that I’ve read pertain to a blank page of a website. The folder where they move the file to is in the same folder of that page of their website. So all of their files are in the exact same place, and it’s easy to isolate which folders need which permissions and where you need to put your code.

    I have been looking all through my file structure of wordpress, and I don’t know where the temporary folder is that needs the write permissions. Hell, I don’t even know where my individual web pages are in my file tree or if it even distinguishes individual pages in a manner that I can understand. I know for a fact though that the folder that I want the files to be put into permanently has the correct permissions. But past that I’m scratching my head.

    All of the searching I have done makes me want to smash my head on a wall. All of the uploading article pertains to uploading files to your blog posts.

    I know that someone has done this before, and knows the solution. If you could be so kind to tell me how to do this it would be greatly appreciate. Thank you for your time.

  • The topic ‘PHP upload function…’ is closed to new replies.