Currently, my directory's structure looks like this:
- project
- app
- Config
- file1.php
- file.txt
This project folder is in /var/www/html
folder. I am including file.txt
in file1.php
using the following code.
require_once '../../file.txt';
The Problem is, it can't find the file even when it is there. This is working on my local system which has Ubuntu 18.04, but not on the server that has Ubuntu 19.04. The project is built using the CakePHP framework.
$ ls -ld /var/www/html/project /var/www/html/project/app \
/var/www/html/project/app/Config /var/www/html/project/file.txt
drwxr-xr-x 6 root root 4096 May 30 11:01 /var/www/html/project
drwxrwxr-x 13 root root 4096 May 29 08:09 /var/www/html/project/app
drwxrwxr-x 3 root root 4096 May 30 05:29 /var/www/html/project/app/Config
-rw-r--r-- 1 root root 3401 May 30 11:13 /var/www/html/project/file.txt