Tuesday, July 31, 2018

zend framework - Require_Once gives PHP Division By Zero Error




I'm trying to require a config file in index.php by using:



require_once __DIR__/application/common/config/Config.php;


However, PHP error logs state division by zero. The full path is /var/www/application/common/config/Config.php



How do I ensure this path is correctl represented in my require_once statement?


Answer



You need to use quotes for strings in PHP...




require_once __DIR__ . '/application/common/config/Config.php';

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...