$handle = fopen ("/home/rasmus/file.txt", "r+");

解决方案 »

  1.   

    两位大哥,可能是我问的不清楚,其实我碰到的问题是这样的
    比如说,有两个php文件
    /**** f1.php ******/
    <?
    include("f2.php");
    $newfile="persons.xml";
    deal($newfile);
    ?>
    /**** f2.php *****/
    <?
    function deal($filename)
    {
    $file=fopen($filename,'w');
    fwrite($file,"123456");
    }
    用IE浏览器运行f1.php,系统提示权限不够,fopen函数不能执行。
    如果把f1.php改成
    <?
    $newfile="persons.xml";
    $file=fopen($filename,'w');
    fwrite($file,"123456");
    ?>
    就没问题了。
    这种情况在zend里运行不会发生的,用IE打开就出问题了
    ps:我用的服务器是IIS