0
votes

It getting following errors.

Warning: require(validation_functions.php): failed to open stream: No such file or directory in C:\xampp\htdocs\practice\validation_errors.php on line 11

Fatal error: require(): Failed opening required 'validation_functions.php' (include_path='.;c:\php\includes;') in C:\xampp\htdocs\practice\validation_errors.php on line 11

I already find the solution but not properly get it.

getcwd(); -> C:\xampp\htdocs\practice

and

echo $_SERVER["DOCUMENT_ROOT"]; -> C:/xampp/htdocs
1
Where does validation_functions.php exists in your file structure? - JustOnUnderMillions
validation_functions.php should be placed with validation_errors.php file - Asim Shahzad
both are in /htdocs/practice folder - Mayank Wasekar

1 Answers

0
votes

You are not providing file name as a string to require() function.

Try like this:

require("validation_functions.php");