linux - 关于thinkphp的import问题
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-16 13:08:01
0
3
352

thinkphp用import导入一个插件的类,然后用+类名实例化,这样在本地上是可行的,但是在服务器上就不行了。执行方法在admin模块里的控制器,调用Common模块的常用方法functions.php里面的test方法,test方法import类,然后实例化,结果not found,test方法里改为用require引入require_once('../Extensions/...'),路径是对的,结果提示:”require(): Failed opening required '../Extensions/PHPThumb/phpthumb.class.php' (include_path='.:/usr/local/php/lib/php')“

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(3)
为情所困

The development environment is Windows and the online environment is Linux, right?
1 Pay attention to capitalization
2 Try both absolute paths and relative paths.

某草草


Write third-party libraries in

phpcn_u1582

In the end, I used absolute paths to solve the problem. I really didn’t want to do this. I hope people with similar experience can leave their answers.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!