Home >Backend Development >PHP Tutorial >javascript - thinkphp qq login

javascript - thinkphp qq login

WBOY
WBOYOriginal
2016-07-06 13:52:42858browse

The entry file of phpSDK is qqConnectAPI.php, which means that this file must be imported before using its class. Of course, this file can be imported in thinkphp. However, if you want to instantiate the QC class after it is introduced, it will not work
and it will prompt that the class cannot be found. The code of the qqConnectAPI.php file is as follows:
require_once(dirname(__FILE__)."/comm/config.php ");
require_once(CLASS_PATH."QC.class.php");

How to solve this problem? Is it necessary to rewrite his code? Introducing namespaces?

Reply content:

The entry file of phpSDK is qqConnectAPI.php, which means that this file must be imported before using its class. Of course, this file can be imported in thinkphp. However, if you want to instantiate the QC class after it is introduced, it will not work
and it will prompt that the class cannot be found. The code of the qqConnectAPI.php file is as follows:
require_once(dirname(__FILE__)."/comm/config.php ");
require_once(CLASS_PATH."QC.class.php");

How to solve this problem? Is it necessary to rewrite his code? Introducing namespaces?

You did not specify the version. The extend paths of 3.5 and 5.0 are different. Generally, if the class itself does not have a namespace after introduction, just enter new class name () directly

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