By outputting $GLOBALS, you can see that the parameters after '/' exist in $_SERVER['PATH_INFO']; declare an array to obtain the parameters we pass after '/'. This article mainly brings you a A simple way to get the value of '/' passed parameter in PHP. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor to take a look, I hope it can help everyone.
$arr = explode('/', $_SERVER['PATH_INFO']); //print_r($arr)查看详细信息
Related recommendations:
php implements a function that can pass variable parameters
vue.js Implementation method of parent passing parameters to child components
Detailed explanation of js anonymous function usage and parameter passing examples
The above is the detailed content of A simple way to get '/' passed parameter in php. For more information, please follow other related articles on the PHP Chinese website!