[Solved] What effect does this code in PHP? [closed]
[ad_1] As you pasted it in one liner <?php session_name(‘MoodleSession’.$CFG->sessioncookie); //设置当前session名称为MoodleSession /* * */ if (check_php_version(‘5.2.0’)) { session_set_cookie_params(0, $CFG->sessioncookiepath, $CFG->sessioncookiedomain, $CFG->cookiesecure, $CFG->cookiehttponly); } else { session_set_cookie_params(0, $CFG->sessioncookiepath, $CFG->sessioncookiedomain, $CFG->cookiesecure); } the only executed function would be session_name(‘MoodleSession’.$CFG->sessioncookie); because you are commenting the rest of the line with a // What does this piece of code? … Read more