chdir(C:\temp);
chmod(C:\temp,0777);

chdir("C:\temp")
chmod("C:\temp",0777);
-------------建议你看看<<PHP 4完全中文手册 >>
chdir
改变目录。语法: int chdir(string directory);返回值: 整数函数种类: 文件存取
 
 
内容说明 
本函数用来改变目前 PHP 执行的目录到新的 directory 目录中。若无法改变则返回 false,成功则返回 true。

解决方案 »

  1.   

    哟,少写了个;号
    chdir("C:\temp");
    chmod("C:\temp",0777);
    呵呵。
      

  2.   

    改后还不好使:
       显示:
    Warning: ChDir: No such file or directory (errno 2) in c:\php\test\upload\load.php on line 9Warning: chmod failed: Invalid argument in c:\php\test\upload\load.php on line 10Warning: Unable to open '' for reading: Permission denied in c:\php\test\upload\load.php on line 11Warning: Supplied argument is not a valid MySQL-Link resource in c:\php\test\upload\load.php on line 13Warning: fopen("","r") - No error in c:\php\test\upload\load.php on line 14Warning: Supplied argument is not a valid File-Handle resource in c:\php\test\upload\load.php on line 14程序:
    <html>
    <head>
    <title>表单</title> 
    </head>
    <body>
       <?
          if(!empty($form_pic)) 
             {  
            chdir("c:\temp");
            chmod("c:\temp",0777);
            copy($form_pic,"c:\temp");
    MYSQL_CONNECT( "localhost", "root", ""); 
    mysql_select_db( "pic",$mysql-db); 
    $data = addslashes(fread(fopen($form_pic, "r"), filesize($form_pic)));         
          MYSQL_QUERY( "INSERT INTO  pic(picno,picdesc,pic,picname)  VALUES('$form_picno','$form_picdesc','$data','$form_picname')");           
         MYSQL_CLOSE();
               }
          else 
             {
                print("您没有上传图片!");
                }
      ?>
      </body>
      </html>