📜  php 文件获取内容替换 & 与 & - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:08.080000             🧑  作者: Mango

代码示例1
$myUrl = 'https://www.myurl.com?';
$myArray = [
    'foo' => 'fooString',
    'bar' => 'barString'
];
$myUrl .= http_build_query($myArray,'','&'); // https://www.myurl.com?foo=fooString&bar=barString
$myData = file_get_contents($myUrl);