发新话题
打印

修改Index.php中的版权信息后出错, 如何解决?

修改Index.php中的版权信息后出错, 如何解决?

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /***/index.php:1) in /**/includes/forelang.php on line 3 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /**/index.php:1) in /home/w9ze0uro/public_html/includes/forelang.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at /**l/index.php:1) in /**/modules/m18_hitcounter/count.php on line 44 Warning: Cannot modify header information - headers already sent by (output started at /**/index.php:1) in /**/index.php on line 141 Warning: Cannot modify header information - headers already sent by (output started at /**/index.php:1) in /**/includes/usersystems/weencompany.php on line 86 weenCompany CWS

国外空间,不懂得解决,请帮忙,谢谢

TOP

修改utf-8的文件不能使用txt文本编辑器,需要使用Editplus或者Dreamweaver等专业网页制作工具。

建议先使用原版程序安装,然后注意备份程序,慢慢修改。修改时严格按照说明修改文件。
weenCompany项目组

闻泰网络-开启你的创意生活!

TOP

我没修改什么啊, 就修改那个版权信息的, 而且是用Dreamweaver.  现在怎么弄? 重新安装?

TOP

不用重新安装。使用原文件替换修改的文件。另:DW保存时也有可能会保存为带BOM(签名)的UTF8文件,此时就会出错。
weenCompany项目组

闻泰网络-开启你的创意生活!

TOP

引用:
原帖由 weenfier 于 2009-5-8 16:41 发表
不用重新安装。使用原文件替换修改的文件。另:DW保存时也有可能会保存为带BOM(签名)的UTF8文件,此时就会出错。
  没有备份 forrelan 文件,怎么办?

TOP

建议将网站中的程序全部删除,再重新上传原程序进行安装。

可能是你的DW版本太老,DW8默认安装后,修改UTF8文件不会有任何问题。
weenCompany项目组

闻泰网络-开启你的创意生活!

TOP

我没有删除网站上的,而是重新上传INSTALL,然后重新安装, 但还是问题存在啊.

TOP

移除UTF8編碼的BOM

<?
//此文件用於快速測試UTF8編碼的文件是不是加了BOM,並可自動移除
//By Bob Shen
$basedir="./";; //修改此行為需要檢測的目錄,點表示當前目錄
$auto=1; //是否自動移除發現的BOM信息。1為是,0為否。
//以下不用改動
if ($dh = opendir($basedir)) {
    while (($file = readdir($dh)) !== false) {
        if ($file!='.' && $file!='..' && !is_dir($basedir."/".$file)) echo "filename: $file ".checkBOM("$basedir/$file")." <br>";
    }
    closedir($dh);
}
function checkBOM ($filename) {
    global $auto;
    $contents=file_get_contents($filename);
    $charset[1]=substr($contents, 0, 1);
    $charset[2]=substr($contents, 1, 1);
    $charset[3]=substr($contents, 2, 1);
    if (ord($charset[1])==239 && ord($charset[2])==187 && ord($charset[3])==191) {
        if ($auto==1) {
        $rest=substr($contents, 3);
        rewrite ($filename, $rest);
        return ("<font color=red>BOM found, automatically removed.</font>");
        } else {
        return ("<font color=red>BOM found.</font>");
        }
    }
        else return ("BOM Not Found.");
    }
function rewrite ($filename, $data) {
    $filenum=fopen($filename,"w");
    flock($filenum,LOCK_EX);
    fwrite($filenum,$data);
    fclose($filenum);
}
?>
    $contents=file_get_contents($filename);
    $charset[1]=substr($contents, 0, 1);
    $charset[2]=substr($contents, 1, 1);
    $charset[3]=substr($contents, 2, 1);
    if (ord($charset[1])==239 && ord($charset[2])==187 && ord($charset[3])==191) {
        if ($auto==1) {
        $rest=substr($contents, 3);
        rewrite ($filename, $rest);
        return ("<font color=red>BOM found, automatically removed.</font>");
        } else {
        return ("<font color=red>BOM found.</font>");
        }
    }
        else return ("BOM Not Found.");
    }
function rewrite ($filename, $data) {
    $filenum=fopen($filename,"w");
    flock($filenum,LOCK_EX);
    fwrite($filenum,$data);
    fclose($filenum);
}
?>


複製以上另存為.php放置於根目錄下執行該檔即可,不過一次只能檢測一個資料夾

TOP

发新话题
最近访问的版块