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)? 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); 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
Archived
This topic is now archived and is closed to further replies.