相关疑难解决方法(0)

php file_get_contents和&

我正在尝试使用php的file_get_content('a url');

例如,如果网址中包含"&",那就是问题

file_get_contents('http://www.google.com/?var1=1&var2=2')

它会自动发出请求 www.google.com/?var1=1&var2=2

我该如何防止这种情况发生?

php

23
推荐指数
2
解决办法
1万
查看次数

标签 统计

php ×1