Search code examples
phpeasyphp

Php script runtime error


I downloaded a php website script and wanted to run in on easy PHP webserver, but I got the following errors:

    Warning: require_once(DB.php): failed to open stream: No such file or directory in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\phpgame\config.php on line 45

Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.;C:\php\pear') in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\phpgame\config.php on line 45

I would be glad if someone can tell me what I am supposed to change according to this warning so that I can run the script. thanks!

This is what is on line 45 on config.php :

 require_once("DB.php");                     // expects PEAR DB.php in /usr/share/php

Solution

  • require_once() is a statement that imports another php script file in another one.

    Your warning and Error syas that : the "DB.PHP" file dose not exist in the path specified . that import occured in config.php file . try find db.php file and put in the paths specified by error description.