linux - Thinkphp import issues
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-16 13:08:01
0
3
393

thinkphp uses import to import a plug-in class, and then instantiates it with + class name. This is feasible locally, but not on the server. The execution method is in the controller in the admin module. Call the test method in functions.php, a common method of the Common module. The test method imports the class and then instantiates it. The result is not found. The test method uses require instead to introduce require_once ('.. /Extensions/...'), the path is correct, the result prompt: "require(): Failed opening required '../Extensions/PHPThumb/phpthumb.class.php' (include_path='.:/usr/local/php/lib/php')"

< /p>

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

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