How to output $ id from the URL, such as tool. php? Info = 200 @ qq @ account $ id
Source: Internet
Author: User
How to output $ id from the URL, such as tool. php? Info = 200 @ qq @ account $ id = $ _ SESSION ['id']; $ info = $ _ GET ['info']; $ arr = expolde (& quot; @ & quot;, $ info); some friends may ask to directly output the value of $ id directly; because how to output the variable $ id in the URL, such as tool. php? Info = 200 @ qq @ account $ id
$ Id = $ _ SESSION ['id'];
$ Info = $ _ GET ['info'];
$ Arr = expolde ("@", $ info );
A friend may ask to directly output the value of $ id;
Because $ id is written into management, and then the user clicks this connection tool. php? Info = @ qq @ account $ id
Then the user ID is automatically output.
I thought about using the eval function, but some friends said it was not safe. Is there any other way to output the $ id in the array $ arr [2] to the variable $ id ??
------ Solution --------------------
Assuming that the final data is still taken from $ _ SESSION
$ V = preg_replace ('/\ $ (\ w +)/ie',' $ _ SEEION ["$1"] ', $ v );
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.