Home > Backend Development > PHP Tutorial > A simple way to get '/' passed parameter in php

A simple way to get '/' passed parameter in php

小云云
Release: 2023-03-20 06:12:01
Original
1515 people have browsed it

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)查看详细信息
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template