Home  >  Article  >  Backend Development  >  thinkphp integration push

thinkphp integration push

WBOY
WBOYOriginal
2016-08-08 09:06:561696browse

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?

thinkphp integration push

Reply content:

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?

thinkphp integration push

<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?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn