Jump to content

path to file not working.


andy1212

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/280445-path-to-file-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.