0
当php_self以html形式加载时,我的脚本加载了url的标题。警告:implode():在加载页面传递的参数无效
<?php
$bk_url=$_REQUEST['bk_url'];
$remote_url = $bk_url;
$from_remote_url = implode("", file("".$remote_url));
if(preg_match("/<title>(.+)<\/title>/", $from_remote_url, $regs)) {
} else {
echo "<br> Title empty. Manual insert";
}
?>
当负载PHP页面,会显示两个错误:
Warning: file(http://): failed to open stream: operation failed
与此错误:
Warning: implode(): Invalid arguments passed
我有试着去发现计算器一个解决方案,但没有找到任何解决方案。
如何解决这两个错误? 谢谢
if(!strlen($ _ REQUEST ['bk_url']))exit(“Can not run with empty URL”); –
它没有什么可怕的爆炸'$ from_remote_url = implode(“”,file(“”。$ remote_url));' – RiggsFolly
它总是一个好主意来检查一个$ _POST或$ _GET参数是否已经真正被传递,并且它实际上在尝试使用'isset()'或'empty()'' – RiggsFolly