andy1212 Posted July 24, 2013 Share Posted July 24, 2013 Im trying to check and see if the path to a file is working and I have the following code to check, if (file_exists('../public_html/cert/ca.crt')) { echo 'yes'; } else { echo 'no'; } I've tried, '/public_html/cert/ca.crt', getcwd().'/cert/ca.crt' and what I have above and all return no. The way I have it set up is like this, in public_html there is a directory called 'cert' and a directory called 'secure'. In 'cert' is the file ca.crt and in 'secure' is the file which I'm testing to see if I can call the path of the ca.crt file into. Is there another way I should be stating the path so it can return 'yes'? Thanks for your time. Quote Link to comment https://forums.phpfreaks.com/topic/280445-path-to-file-not-working/ Share on other sites More sharing options...
andy1212 Posted July 24, 2013 Author Share Posted July 24, 2013 (edited) nvm i figured it out, just went ../cert/ca.crt Edited July 24, 2013 by andy1212 Quote Link to comment https://forums.phpfreaks.com/topic/280445-path-to-file-not-working/#findComment-1441892 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.