I tried to include a file in another directory using php. There are two directories
Name of first directory : ‘includes’ and it contains a file called sample.php
Name of second directory : ‘core’ and it contains main.php
I need to include the main.php file in sample.php. I used the following but it still shows the warning saying no such file exists. But the file is live there.
include '../main.php';
So what do I do now ?
Try this