2
What is this mistake:
Warning: require_once(../config.php): failed to open stream: No such file or directory in C: xampp htdocs... CRUD.php on line 2
Fatal error: require_once(): Failed Opening required '.. /config.php' (include_path='C: xampp php PEAR') in C: xampp htdocs... CRUD.php on line 2
Note: The file config.php exists, and this in a previous folder called the require
.
Can you send the snippet of the code in question? This seems to me a syntax error
– Samuel Ives
<? php require_once '.. /config.php'; ? > Then it’s the rest of the code. Plus that’s the error line
– w.rock
Use the absolute path instead of "../".
require_once __DIR__."/config.php"
, for example.– Valdeir Psr
The constant DIR did not work because the config,php file is in a previous folder. And as the ".. /" is not working to return a folder, ended up not working. So I put the full path "C:/xampp/htdocs/.../config.php and it worked. More if you have a better shape than this one I did, thank you.
– w.rock
I saw this answer https://stackoverflow.com/questions/62658/getting-pear-to-work-on-xampp-apache-mysql-stack-on-windows if it helps. Tou is cpm doubts how to include_path=C: xampp php PEAR... If anyone can help. I have the same problem
– Inês Barata Feio Borges