The problem has been resolved ... is the next section of the program error, so do not execute, but the server did not open the error, no display. Thanks
Click on a page, the page, will submit a request to the third-party server, the third-party server will return data, the page based on the return data to determine the next execution. However, after the data is returned, the remaining code cannot be executed.
So I want to ask.
The code is similar so that after $json _result is acquired, the following is not performed.
if ($action = = "GetUserInfo")
{
$json _result = $httpservermgr->https_request ($url);//Submit with Curl
}
if (determine if the condition is satisfied in the Json_result)
{
Get user Information display:
}
Else
{
No get show ...
}
Reply content:
The problem has been resolved ... is the next section of the program error, so do not execute, but the server did not open the error, no display. Thank you
Click on a page, the page, will submit a request to the third-party server, the third-party server will return data, the page based on the return data to determine the next execution. However, after the data is returned, the remaining code cannot be executed.
So I want to ask.
The code is similar so that after $json _result is acquired, the following is not performed.
if ($action = = "GetUserInfo")
{
$json _result = $httpservermgr->https_request ($url);//Submit with Curl
}
if (determine if the condition is satisfied in the Json_result)
{
Get user Information display:
}
Else
{
No get show ...
}
What do you mean, what code is not executed? Check if there is an error in CURL.
Print out the $json_result first to see if the content is correct.
You have encountered this problem before because you requested a URL for HTTPS, but you did not configure it 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);//用curl提交if(判断json_result里是否满足条件){//获取用户信息显示。。}else{//没有获取显示。。。}
}elseif ($action = = = ' XXXXX ') {
$json_result = $httpservermgr->https_request($url);//用curl提交if(判断json_result里是否满足条件){//获取用户信息显示。。}else{//没有获取显示。。。}
}else{
}
Let me give you a tip. Error prompting for PHP to debug by printing a variable (var_dump function) It is possible that a third-party class library is improperly used to cause the program to stop running
$json_result = ""; //先定义if($action=="getUserInfo"){$json_result = $httpservermgr->https_request($url);//用curl提交}if(! empty($json_result)){var_dump($json_result)//获取用户信息显示。。}else{echo "没有数据";//没有获取显示。。。}