can use inclue outside main directory
Posted: 05. January 2019 01:34
I just installed Xampp portable on a flash disk and I'm having issues using include to call a file from another folder. everything runs just fine if the if everything is in the root directory. Any help with this would be very appreciated.
The errors
main php code
Included file code in a folder test
The errors
- Code: Select all
Warning: include(/test/test_file.php): failed to open stream: No such file or directory in E:\xampp\htdocs\test.php on line 3
Warning: include(): Failed opening '/test/test_file.php' for inclusion (include_path='.;E:\xampp\php\includes') in E:\xampp\htdocs\test.php on line 3
main php code
- Code: Select all
<?php include "/test/test_file.php"; ?>
Included file code in a folder test
- Code: Select all
<?php echo "passed"; ?>