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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.