简体   繁体   中英

How do i read the URL using PHP (which is the url returned in browser)

http://www.local.com/?code=xxxxxxxxxxxxxxxxxxxxxxxx

I want to retrieve and save code parameter in PHP

you can try this

$code = $_GET['code'];

now $code will have value of code which is in url

Maybe this will work:

<?php $code = $_GET['code']; ?>

$code should now have the code in the URL.

For more information on $_GET , see this page .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM