Home >Backend Development >PHP Tutorial >javascript - thinkphp qq login
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?
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