TP Framework Vendor Third-party library reference issues

Source: Internet
Author: User
Tags autoload
A new class is created in the common folder of the Tp application directory for use by the controller.
Class A in the Common file removes third-party libraries in vendor
Tp version 3.2.3

The problem is as follows

First, by calling composer's autoload.php file to load the third-party library resources, can not be referenced correctly, prompting me to use the class does not exist
(Mainly want to call ffmpeg this tool to crop the video)
Tried to quote directly through require because of the references involved many feel that this is not reliable,
Referencing through the vendor function does not solve the problem.
Now it's through
Require __dir__. ' /.. /.. /.. /thinkphp/library/vendor/autoload.php ';
Plus use to quote

Ii. What is the relationship between use and require?

Not much, please help.

Reply to discussion (solution)

The tablets are respectively
Third-party class libraries
Program Structure
Error hints

For composer automatic loading have any experience also trouble explain, PHP novice more advice

Remember that the third-party class library should be placed in the Org directory, referenced by the Org function

Remember that the third-party class library should be placed in the Org directory, referenced by the Org function

In addition to the location of this, the information provided above can see the error point of the program?

Thank you, I have solved it by other means.
Personal feel TP import third-party frame comparison pits. Used up the egg hurts.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.