header("Content-type: text/html; charset=utf-8");define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FILE__).'/../../../'))."/");//获取根目录。无需用可以删除$file = fopen(BASE_PATH."/lei.txt", "r") or exit("Unable to open file!");while(!feof($file)){
echo fgets($file). "<br />";}fclose($file);