The problem has been solved... It is a later program error, so do not execute, but the server did not enable the error, not displayed. When you click a page, a request will be submitted to the third-party server, and the third-party server will return data. The page will be determined based on the returned data...
The problem has been solved... It is a later program error, so do not execute, but the server did not enable the error, not displayed. Thank you.
When you click a page, a request is submitted to the third-party server. The third-party server returns data, and the page determines the next step based on the returned data. However, after the data is returned, the remaining Code cannot be executed.
So I want to ask.
The code is similar. After $ json_result is obtained, the following will not be executed.
If ($ action = "getUserInfo ")
{
$ Json_result = $ httpservermgr-> https_request ($ url); // submit with curl
}
If (determine whether conditions are met in json_result)
{
// Obtain the user information display ..
}
Else
{
// No display is obtained...
}
Reply content:
The problem has been solved... It is a later program error, so do not execute, but the server did not enable the error, not displayed. Thank you.
When you click a page, a request is submitted to the third-party server. The third-party server returns data, and the page determines the next step based on the returned data. However, after the data is returned, the remaining Code cannot be executed.
So I want to ask.
The code is similar. After $ json_result is obtained, the following will not be executed.
If ($ action = "getUserInfo ")
{
$ Json_result = $ httpservermgr-> https_request ($ url); // submit with curl
}
If (determine whether conditions are met in json_result)
{
// Obtain the user information display ..
}
Else
{
// No display is obtained...
}
What do you mean? What code is not executed? Check whether errors occur during CURL.
Print $ json_result first to check whether the content is correct.
I have encountered such a problem before because I requested an https url but it was not configured in php. ini:
curl http://curl.haxx.se/ca/cacert.pem -o /opt/openssl/ssl/cert.pem
If ($ action = 'getuserinfo ')
{
$ Json_result = $ httpservermgr-> https_request ($ url); // use curl to submit if (determine whether conditions are met in json_result) {// obtain the user information display ..} Else {// No display is obtained ...}
} Elseif ($ action = 'xxxxx '){
$ Json_result = $ httpservermgr-> https_request ($ url); // use curl to submit if (determine whether conditions are met in json_result) {// obtain the user information display ..} Else {// No display is obtained ...}
} Else {
}
It is recommended that you enable the PHP error prompt to debug the program by printing the variable (var_dump function). It may be because the third-party class library is incorrectly used and the program stops running.
$ Json_result = ""; // first define if ($ action = "getUserInfo") {$ json_result = $ httpservermgr-> https_request ($ url ); // submit with curl} if (! Empty ($ json_result) {var_dump ($ json_result) // obtain the user information display ..} Else {echo "no data"; // No display is obtained ...}