Third-party database reference in tp framework

Source: Internet
Author: User
In the Common folder of the tp Application directory, a class is created for the Controller to use.
Class A in the Common file removes the third-party library in the vendor.
Tp version 3.2.3





The problem is as follows:

1. the third-party library resources cannot be correctly referenced by calling the composer autoload. php file, prompting that the class I want to use does not exist
(I want to call the ffmpeg tool to crop videos)
I tried to reference it directly through require because many of the references involved think this is unreliable,
The problem cannot be solved by referencing through the vendor function.
Now
Require _ DIR _. '/.../../ThinkPHP/Library/vendor/autoload. php ';
Add use to reference

2. what is the relationship between use and require?


Not much. please help.


Reply to discussion (solution)

Take slice
Reference
Third-party class libraries
Call
Program Structure
Error message

For more information about how to automatically load composer

Remember that third-party class libraries should be placed in the ORG directory and referenced using the ORG function

Remember that third-party class libraries should be placed in the ORG directory and referenced using the ORG function



Besides location, can the information provided above show the program's error points?

Thank you. I have already solved this problem in other ways.
I personally feel that it is difficult to import tp to a third-party framework. It 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: info-contact@alibabacloud.com 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.