search

Home  >  Q&A  >  body text

linux - Thinkphp import issues

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>

曾经蜡笔没有小新曾经蜡笔没有小新2759 days ago379

reply all(3)I'll reply

  • 为情所困

    为情所困2017-05-16 13:10:01

    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.

    reply
    0
  • 某草草

    某草草2017-05-16 13:10:01


    Write third-party libraries in

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:10:01

    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.

    reply
    0
  • Cancelreply