thinkphp integration push

WBOY
Release: 2016-08-08 09:06:56
Original
1728 people have browsed it

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>
Copy after login

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>
Copy after login

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?

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template