Home  >  Article  >  Backend Development  >  ucenter integration, communication failure, debugging test troubleshooting method_PHP tutorial

ucenter integration, communication failure, debugging test troubleshooting method_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:43:37767browse

This article will introduce to you about ucenter integration, communication failure, debugging and testing troubleshooting methods. I hope this method will be helpful to you.

The failure is because there may be an error in your application's api/uc.php. For example, ucenter stipulates that only if the uc.php file returns 1 normally, the communication will be prompted to be successful. But if yours returns a sql error .Instead of 1, it must indicate failure. How to test it

?>

The code is as follows
 代码如下 复制代码

include_once “config/config_global.php”;
include_once “config/config_ucenter.php”;
include_once “uc_client/client.php”;
echo uc_user_synlogin(2); //1为用户的ID

?>

Copy code

include_once “config/config_global.php”;
include_once “config/config_ucenter.php”;
include_once “uc_client/client.php”;
echo uc_user_synlogin(2); //1 is the user’s ID

Save the above code into a test.php file. Place it in the root directory of your dz forum or ucenter, and directly use the domain name .com/test.php to see if there are any errors. Of course, in the .uc.php file error_reporting(0); Comment out this sentence at the end. The error will be displayed more clearly. After finding the error, this sentence must be added. Otherwise, the communication may continue to fail. http://www.bkjia.com/PHPjc/633168.htmlwww.bkjia.com
true
http: //www.bkjia.com/PHPjc/633168.html
TechArticleThis article will introduce to you about ucenter integration, communication failure, debugging and testing troubleshooting methods. I hope this method will be useful to you. Classmates will be helpful. The failure is because of your application's...
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