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

javascript - thinkphp qq login

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-06 13:52:42
Original
904 people have browsed it

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

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template