PHP解析URL并得到URL中的参数_PHP教程
程序员文章站
2022-05-30 23:49:06
...
$param) { $tmp[] = $k.'='.$param; } $params = implode('&',$tmp); return $params; } ?>
输出结果:
array (size=4) 'scheme' => string 'http' (length=4) 'host' => string 'test.com' (length=8) 'path' => string '/testdir/index.php' (length=18) 'query' => string 'param1=10¶m2=20¶m3=30¶m4=40¶m5=50¶m6=60' (length=59) array (size=6) 'param1' => string '10' (length=2) 'param2' => string '20' (length=2) 'param3' => string '30' (length=2) 'param4' => string '40' (length=2) 'param5' => string '50' (length=2) 'param6' => string '60' (length=2) string 'param1=10¶m2=20¶m3=30¶m4=40¶m5=50¶m6=60' (length=59)
上一篇: js实现div的切换特效上一个下一个_javascript技巧
下一篇: 详解php中反射的应用