$ _GET变量的类型
问题描述:
我在 .htaccess
文件中有这个重写器
I have this rewriterule in .htaccess
file
RewriteRule ^(.+)$ index.php?url=$1
然后,当我检查 $ _ GET ['url']
的类型时,它总是一个字符串.
Then, when I check type of $_GET['url']
, is always a string.
我想知道是否有可能,在浏览器的地址栏中写一些魔术符号(或类似的东西)并在 $ _ GET ['url']
中获得另一种类型(不是字符串)?
I interested to know whether or not it's possible, to write in the browser's address bar some magic symbols (or something like this) and obtain in $_GET['url']
an other type (not string)?
还是 $ _ GET
的类型始终是 string
?
答
如果您这样做:
index.php?url=asd&url[]=asd //asd&url[]=asd being the dynamic part
然后 $ _ GET ['url']
将是一个数组.