I am having trouble uploading files to folders outside of the the folder I am running the php script from.
For example this folder layout works fine:
test (contains upload.php etc)
test/uploads (stores uploaded content)
I can't seem to upload files to a folder which is a level up from the one the script is in.
i.e. script is here
root/mysite/admin/upload.php
and the folder i want to upload files to is here:
root/mysite/uploads
If I had a html document stored in the admin folder in which it displays the images, I can display them using the path /uploads/image.jpg but I can't upload to it from a script running in a different folder.
Can anyone share some light as to how to get around this cause it should be straight forward but apparently its not.
I thought I could use the path /uploads but that doesn't work.
Cheers
PS- I am using 'move_uploaded_file' btw
For example this folder layout works fine:
test (contains upload.php etc)
test/uploads (stores uploaded content)
I can't seem to upload files to a folder which is a level up from the one the script is in.
i.e. script is here
root/mysite/admin/upload.php
and the folder i want to upload files to is here:
root/mysite/uploads
If I had a html document stored in the admin folder in which it displays the images, I can display them using the path /uploads/image.jpg but I can't upload to it from a script running in a different folder.
Can anyone share some light as to how to get around this cause it should be straight forward but apparently its not.
I thought I could use the path /uploads but that doesn't work.
Cheers
PS- I am using 'move_uploaded_file' btw
Last edited: