Hi
I try to run the file through the terminal, but I get an error, for example, "include path is not correct"
for example, I have "test.php" in the following folder
/home/sekar/test/file.php
in the php file, I included the file "head.php", which is located in
/home/sekar/test/includes/head.php
Thes head.php includes the cls.php class file, which is located in the class folder,
/home/sekar/test/classes/cls.php
I tried this in the terminal,
php /home/sekar/test/file.php
for a clear view, just look at the contents of @ these three files,
file.php
<?php include_once "./test/includes/head.php"; ?>
head.php
<?php include_once "./test/classes/cls.php"; ?>
cls.php
<?php echo "this is from cls file"; ?>
Can someone help me solve this problem? Thanks!
source share