cbassett03 Posted June 20, 2010 Share Posted June 20, 2010 OK, if I wanted to create a script called fileupload.php (that is called using a FORM in an HTML file), that is located at the following location (example): www.mysite.com/admin/fileupload.php and let's say that I wanted to upload to a folder located at "www.mysite.com/content/photos/trips" How can I do this? I would image that I would need to change the permissions of the "trips" folder to do this. Can I upload to this location even though the PHP script is not in the same folder as where the file is being uploaded to? Also, can you change directory permissions via a PHP script (if so, how)? Quote Link to comment https://forums.phpfreaks.com/topic/205290-uploading-files-to-another-folder-using-php-script-need-help/ Share on other sites More sharing options...
jcbones Posted June 20, 2010 Share Posted June 20, 2010 Should be able to do it like: move_uploaded_file($tmp_name,'../content/photos/trips/'.$new_name); Quote Link to comment https://forums.phpfreaks.com/topic/205290-uploading-files-to-another-folder-using-php-script-need-help/#findComment-1074512 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.