Issue background:
Phpcms The foreground exit login, prompted a successful exit 0
I'm so confused. Why is there a 0?
Problem Analysis:
Enter
./phpcms/modules/member/index.php
Find the logout method with the following code:
Public functionlogout () {$setting= Pc_base::load_config (' System '); //sNDA Exit if($setting[' snda_enable '] && param::get_cookie (' _from ') = = ' sNDA ') {param:: Set_cookie (' _from ', '); $forward=isset($_get[' Forward ']) &&Trim($_get[' Forward ']) ?UrlEncode($_get[' Forward ']) : ‘‘; $logouturl= ' https://cas.sdo.com/cas/logout?url= '.UrlEncode(App_path. ' Index.php?m=member&c=index&a=logout&forward= '.$forward); Header(' Location: '.$logouturl); } Else { $synlogoutstr= ";//Synchronous exit JS Code if(Pc_base::load_config (' System ', ' Phpsso '))) { $this-_init_phpsso (); $synlogoutstr=$this->client->ps_member_synlogout (); } param:: Set_cookie (' auth ', '); Param:: Set_cookie (' _userid ', '); Param:: Set_cookie (' _username ', '); Param:: Set_cookie (' _groupid ', '); Param:: Set_cookie (' _nickname ', '); Param:: Set_cookie (' cookietime ', '); $forward=isset($_get[' Forward ']) &&Trim($_get[' Forward ']) ?$_get[' Forward ']: ' Index.php?m=member&c=index&a=login '; ShowMessage (L (' Logout_success ').$synlogoutstr,$forward);//Exit Success 0 } }
Problem solving:
Note the showmessage of the last line, the first parameter inside is
L (' logout_success '). $synlogoutstr
On behalf of the message content, checked
./languages/zh-cn/member.lang.php
In logout_success really is the exit success four words, but this later spelled a $synlogoutstr, the examiner is really that 0, if you do not want him to exit the success of the show, Just remove the string and you can do it.
The string shown in the above code is synchronous exit JS, so it should be a status code, it might be useful for developers. ~mark, please.
Phpcms Reception exit Log in when the message ' exit Success 0 '