Php 在真实主机上运行我的脚本
我的脚本在本地主机上工作正常,但在我的域上不工作Php 在真实主机上运行我的脚本,php,Php,我的脚本在本地主机上工作正常,但在我的域上不工作 <?php error_reporting(E_ALL); ini_set('display_errors', true); $needle = $_POST['utext']; $file = $_POST['ufile']; $new = file($file); $new = array('trim', $new); echo '#entries: ', count($new
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
$needle = $_POST['utext'];
$file = $_POST['ufile'];
$new = file($file);
$new = array('trim', $new);
echo '#entries: ', count($new), "\n";
$found = array(); $notfound=array();
foreach ( $new as $check ) {
echo "<table border='1'><tr>";
echo '<td>processing = ', $check.'</td>';
$a = file_get_contents($check);
if (strpos($a,$needle)) {
echo "<td><font color='green'> found\n</font></td>";
$found[] = $check;
}
else {
echo "<td><font color='red' face='bold'> not found\n</font></td>";
$notfound[] = $check;
}
}
echo '<tr><td>#Matches: ', count($found), "</td></tr>";
echo "<br />";
echo '#No-Matches: ', count($notfound), "\n";
echo "<br />";
echo "</tr></table>";
?>
有人能告诉我我的脚本有什么问题吗
补充:
我收到了这个错误消息
警告:文件(Your Backlinks.txt)[function.file]:无法打开
流:中没有这样的文件或目录
/home/husdemo/public_html/backlink.php第27行警告:
文件获取内容(trim)[function.file get contents]:打开失败
流:中没有这样的文件或目录
/第35行的home/husdemo/public_html/backlink.php
您是否正在使用短标记
上传您的Backlinks.txt到服务器可能本地和远程服务器中的php版本不同可能php.ini配置不一样如果显示任何错误消息,如果您将其添加到问题警告:文件(Your Backlinks.txt)[function.file]:无法打开流:第27行的/home/husdemo/public\u html/backlink.php中没有此类文件或目录警告:文件获取内容(trim)[function.file获取内容]:无法打开流:第35行的/home/husdemo/public_html/backlink.php中没有这样的文件或目录文件名上没有卫生设施/验证是非常危险的允许_url_fopen已经上载了它,但这次也是相同的结果您是否收到相同的错误消息?