Hi everyone I think I am having some sort of issue trying to use require_once
the file exists.
if(file_exists('includes/bootstrap.php'))
echo "yes";
else echo "no";
but when i try
require_once('includes/bootstrap.php') or die('Could not find file');
I get:
PHP Warning: require_once(1): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/www.site.dev/test.php on line 8
PHP Fatal error: require_once(): Failed opening required '1' (include_path='.:') in /Applications/MAMP/htdocs/www.site.dev/test.php on line 8
Should the warning show the file in the parenthesis instead of 1?
I tried also doing:
ini_set('include_path', ini_get('include_path') . ':' . dirname(FILE) . DS . 'includes');
but still same issue.
I dont have a problem when I do include_once.