![]() |
PHP Move_Uploaded_File problem
Hi,
I am trying to allow users on my website to upload a file. The file will be stored permanently in a directory labelled upload and then the file will be saved on a mysql database. The problem starts with saving the file permanently. The file does not show up in the directory i've labelled. Can you check my code out because I have looked up solutions for a while and I am kinda stuck? Thanks, Eric PHP Code:
|
Any help would be appreciated :D
|
The first thing I notice is in your savedata() function you are trying to access some global variables that aren't declared as global:
PHP Code:
|
Thanks, will do.
|
I don't see chmod anywhere in your script. Usually you have to chmod upload files and folders. I would recommend against uploading to a common folder, too much chance of collisions. A good way is to make a large separate folder just for the images, and have individual folders for each user inside it.
|
| All times are GMT +1. The time now is 11:51 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.