0
我的系统:windos xp使用WAMP:在Windows上读取文件权限
我已将所有用户权限授予文件。
,但我无法读取文件,但我得到的文件大小,
为什么这样的事情发生,原因,我无法确定。
我该怎么办才能解决这个问题。
代码
$fileName = "1.php";
if (floatval(phpversion()) >= 4.3) {
//loading data
$fileData = file_get_contents($fileName);
print(filesize($fileName));
} else {
//if file not exist then return -3
if (!file_exists($fileName)) {
eturn -3;
}
$fp = fopen($fileName, 'r');
// if file is not open in read mode then return -2
if (!$fp) return -2;
$fileData = '';
print(filesize($fileName));
//checking end of file
while(!feof($fp))
$fileData .= fgetc($fileName);
fclose($fp);
}
echo $fileData;
尝试启动WAMP的服务器管理员 – Parzifal 2012-01-08 17:21:26
首先的尝试找出错误信息是什么。 – hakre 2012-01-08 17:25:50
在这里分享一些代码 – 2012-01-08 17:27:12