ahsan
ahsan

Reputation: 33

Path to a folder that is outside the current folder

I have a file index.php in jobLister/jobs/pakistan/chemical/index.php and I want to include a file inside the index.php whose location is jobLister/config/init.php.

I have tried using ../config/init.php but that does not work.

Error that I get: No such file or directory in C:\wamp64\www\jobLister\jobs\pakistan\Chemical\index.php

Upvotes: 0

Views: 1492

Answers (1)

Python Hunter
Python Hunter

Reputation: 2146

You should use:

../../../config/init.php

or the full absolute path.

What you are using is trying to retrieve the file from

obLister/jobs/pakistan/config , hence the error

Upvotes: 3

Related Questions