This article introduces the ucenter integration, communication failure, and debugging and testing troubleshooting methods. I hope this method will be helpful to you.
The failure is caused by the api/uc of your application. php may have errors. for example, ucenter rules. only uc. if the php file returns 1 normally, a message indicating successful communication is displayed. however, if you return an SQL error. instead of 1, it must be a failure prompt. how to test it?
The Code is as follows: |
Copy code |
<? Php Include_once "config/config_global.php "; Include_once "config/config_ucenter.php "; Include_once "uc_client/client. php "; Echo uc_user_synlogin (2); // 1 indicates the user ID ?> <Script type = "text/javascript"> Var obj = document. getElementsByTagName ("script "); For (var I = 0; I <obj. length-1; I ++ ){ Document. write ("<a href =" "+ obj [I]. src + ">" + obj [I]. src + "</a> } </Script> |
The above code is saved as test. PHP file. put it in the root directory of your dz forum or ucenter and use the domain name directly. com/test. php to see if any error is prompted. of course. uc. PHP File
Error_reporting (0); comment out this sentence first. The error will be displayed more clearly. After the error is found, add this sentence. Otherwise, the communication may fail.