Where should the third-party sdk of yii2 be placed in the project?

for example, where should a Taobao guest"s sdk be placed so that it can load

automatically?
Mar.19,2021

you can configure compser: if you put it in any location.

"autoload": {
    "classmap": [""]
}

is then generated with the command composer dump-autoload .
but not all sdk in Taobao has an entry file such as TopSdk.php file, so you might as well require this file directly when you use it.

A more recommended method is to find an encapsulated class with a namespace on github, such as randomly searching for a https://github.com/ennnnny/tbk.


it's hard to load perfectly without composer.

official documentation:
ide/2.0/tutorial-yii-integration-sharpusing-libs-in-yii" rel=" nofollow noreferrer "> using third-party libraries in Yii2

you can refer to this project and write an auto-loading class.
https://github.com/songyichao.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3290b-4d4c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3290b-4d4c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?