新手部署一个php网站,已经试过phpstudy和XAMPP集成环境下部署,也试过手动iis下配置php,window10系统,php是7.3,XAMPP3.2.3,一直报Think.class.php335和151错,错误如下:
Warning: include(/data/home/qyu2379690001/htdocs/simplewind/Core/Library/Think/Log.class.php): failed to open stream: No such file or directory in E:\test_20190329\simplewind\Core\Library\Think\Think.class.php on line 151Warning: include(): Failed opening '/data/home/qyu2379690001/htdocs/simplewind/Core/Library/Think/Log.class.php' for inclusion (include_path='C:\xampp\php\PEAR') in E:\test_20190329\simplewind\Core\Library\Think\Think.class.php on line 151Fatal error: Uncaught Error: Class 'Think\Log' not found in E:\test_20190329\simplewind\Core\Library\Think\Think.class.php:335 Stack trace: #0 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(257): Think\Think::trace('[2] include(/da...', '', 'NOTIC') #1 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(151): Think\Think::appError(2, 'include(/data/h...', 'E:\\test_2019032...', 151, Array) #2 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(151): include() #3 [internal function]: Think\Think::autoload('Think\\Log') #4 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(227): spl_autoload_call('Think\\Log') #5 [internal function]: Think\Think::appException(Object(Error)) #6 {main} thrown in E:\test_20190329\simplewind\Core\Library\Think\Think.class.php on line 335Fatal error: Uncaught Error: Class 'Think\Log' not found in E:\test_20190329\simplewind\Core\Library\Think\Think.class.php:335 Stack trace: #0 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(257): Think\Think::trace('[2] include(/da...', '', 'NOTIC') #1 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(151): Think\Think::appError(2, 'include(/data/h...', 'E:\\test_2019032...', 151, Array) #2 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(151): include() #3 [internal function]: Think\Think::autoload('Think\\Log') #4 E:\test_20190329\simplewind\Core\Library\Think\Think.class.php(264): spl_autoload_call('Think\\Log') #5 [internal function]: Think\Think::fatalError() #6 {main} thrown in E:\test_20190329\simplewind\Core\Library\Think\Think.class.php on line 335

解决方案 »

  1.   

    Thinkphp5没办法下了吗??
      

  2.   

    看报错是文件没有打开,是不是文件没下全啊?另外,项目配置好了吗?demo能运行吗?
      

  3.   

    Think.class.php这个脚本引用类Think\Log的时候出错。原因可能是Think\Log类(/data/home/qyu2379690001/htdocs/simplewind/Core/Library/Think/Log.class.php)不存在,或者引用方法出错。引用这个类的地方在Think.class.php的335行和151行,去检查一下就知道了。
      

  4.   

    有人帮忙看下吗
    不应该啊别人用这个能部署,在我电脑上就用不了,环境应该没问题,是需要随便找个phpdemo跑一下嘛
      

  5.   

    在151行加入
    if($class=="Think\Log"){
                    include "Log.class.php";
                }else{
                    include self::$_map[$class];
                }
    查看页面,正常后再恢复源代码,推测是window环境下编译的文件不一样,可以先清除本地缓存runtime之后试试