编码
<?php
$_SERVER['QUERY_STRING'];
$text = $_SERVER['QUERY_STRING'];
$var_str = var_export($text, true);
$var = "<?php\n\n\$text = $var_str;\n\n?>";
file_put_contents('testnew.php', $var);
echo $text;
?>
我想要做的是从 url 获取查询字符串并将其存储在 php 文件 testnew.php 中
http://test.com/query.php?asdawdawd
注意我是初学者
编辑:现在获取查询字符串部分在@tim 建议之后工作,但它仍然没有将查询字符串写入文件
慕尼黑的夜晚无繁华