duangong937906 2015-12-20 05:57
浏览 76
已采纳

未定义的变量:__ ROOT__ PHP 7? [重复]

Install new PHP 7.01.

And have some errors:

PHP Notice:  Undefined variable: __ROOT__ in C:\web\index.php on line 60

require_once($__ROOT__.'/base/DBMS.php'); // - line 70
</div>
  • 写回答

1条回答 默认 最新

  • dougai2427 2015-12-20 06:09
    关注
    $__ROOT__ 
    

    seem's to be your document root (writed as a "magic constant" variable.. and visibly, the transition to php7 broke... :)

    often it's defined by using real php magic constant like :

    For PHP >= 5.3.0 try

    __DIR__ 
    

    For PHP < 5.3.0 try

    dirname(__FILE__)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?