Home >Backend Development >PHP Tutorial >thinkphp integration push
When using thinkphp, put the downloaded push sdk into the vendor directory. How to reference it into the project?
vendor('iGT.IGt.Push');
Why can't it be referenced?
When using thinkphp, put the downloaded push sdk into the vendor directory. How to reference it into the project?
vendor('iGT.IGt.Push');
Why can't it be referenced?
<code>vendor("IGT.IGT", '' ,'.Push.php');</code>
Yours is actually loading the Vendor/iGT/IGT/Push.php
file
Try how to change the file extension
<code>vendor('iGT.IGt', dirname(__FILE__), '.Push.php');</code>
Or change the file name, do not appear in the file name .
It is recommended to use namespace to introduce class, and it is not recommended to use vendor function
new VendoriGTIGTPush();
Isn’t this okay?