刚接触php,弄个教程看看,实验试验,以下代码没有文件的时候出现了File not found,有文件的时候倒是没反映了。也没看到打开的文件,我把welcome.txt放在以下php文件所在的文件夹下了,有什么不妥吗?
<?php
if(!file_exists("welcome.txt"))
{
die("File not found");
}
else
{
$file=fopen("welcome.txt","r");
}
?>
<?php
if(!file_exists("welcome.txt"))
{
die("File not found");
}
else
{
$file=fopen("welcome.txt","r");
}
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货