The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
I want to check particular text files and images exist during the PHP script, and it'll work fine for the .txt files, but the images (which are .jpg files) don't...
They have the same file permissions as the .txt files (though I'm sure permissions don't matter anyway, as file_exists() just checks the file actually exists, not whether you can read it...), are in the same folder, and are definitely there, as I can display them using tags in the HTML, so they're definitely uploaded successfully...
It's just that file_exists() doesn't seem to like them or recognise that they are in fact there...
Any suggestions?
Cheers!
[EDIT] - Gah, make a topic, then immediately fix it! Not sure what was wrong though, but noticed the file_exists() for the .txt files had a relative path (ie. no leading '/'), while the one for the .jpg files was an absolute path, starting from my public_html... Made the .jpg one relative too and it worked fine... Not sure why that is but it's working now so all is well...
I want to check particular text files and images exist during the PHP script, and it'll work fine for the .txt files, but the images (which are .jpg files) don't...
They have the same file permissions as the .txt files (though I'm sure permissions don't matter anyway, as file_exists() just checks the file actually exists, not whether you can read it...), are in the same folder, and are definitely there, as I can display them using tags in the HTML, so they're definitely uploaded successfully...
It's just that file_exists() doesn't seem to like them or recognise that they are in fact there...
Any suggestions?
Cheers!
[EDIT] - Gah, make a topic, then immediately fix it! Not sure what was wrong though, but noticed the file_exists() for the .txt files had a relative path (ie. no leading '/'), while the one for the .jpg files was an absolute path, starting from my public_html... Made the .jpg one relative too and it worked fine... Not sure why that is but it's working now so all is well...