<?php $name=$_GET['id'];
echo $name;
$path="./txt/{$name}.txt";
if(!file_exists($path)) {
$fp=fopen($path,"w");
fputs($fp,"1");
fclose($fp);
}
else {
$num=file_get_contents($path);
$num=$num+1;
file_put_contents($path,$num);
}
?>这段代码在WINDOW下可以创建 但是我放到 服务器里(linux系统)却提示Warning: fopen(./txt/126.txt) [function.fopen]: failed to open stream: Permission denied in ..............
echo $name;
$path="./txt/{$name}.txt";
if(!file_exists($path)) {
$fp=fopen($path,"w");
fputs($fp,"1");
fclose($fp);
}
else {
$num=file_get_contents($path);
$num=$num+1;
file_put_contents($path,$num);
}
?>这段代码在WINDOW下可以创建 但是我放到 服务器里(linux系统)却提示Warning: fopen(./txt/126.txt) [function.fopen]: failed to open stream: Permission denied in ..............
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货