I have a cms I made for school a while ago that I am finally uploading live. While I had it on my local machine, I simply had the path to my image folder hardcoded as
$path = C:\path\to\my\uploads
Of course now that it is on a server, this will no longer work. I can’t for the life of me remember the syntax of how to get it INTO the upload folder.
My images are simply landing with all of my other html and php files on the server instead of in my uploads folder. Then my image gallery is broken, because it looks for my thumbnails in my uploads folder.
I tried
$path = ..//uploads
and
$path = uploads
and
$path = //uploads
and none work.
I am feeling really stupid now.
Please help!
Since the
uploadsdirectory is at the same level as the rest of the code, it’s easiest to simply do:Windows will also accept
The
./at the beginning isn’t even really necessary if you’re calling it from the directory in which it resides:But the first version
./uploadsis most portable and explicit.