一个是服务器端、一个是客户端,不要搞错了。
你所说的运行正常,也仅仅是读取服务器上的文件而已,并不是你所想象的读取客户端的文件,所以说换到LINUX下就不行了,如果要上传文件就老老实实地用FILE表单传吧。

解决方案 »

  1.   

    是的,用的是表单传,但是现在怎样在LIUNX下才能识别这个路径。
      

  2.   

    识别这个路径?
    上传了之后会有一个变量$_FILES。
    FILE的名字如果是userfile
    那么,上传以后会有以下变量生成:$_FILES['userfile']['name']
    The original name of the file on the client machine. $_FILES['userfile']['type']
    The mime type of the file, if the browser provided this information. An example would be "image/gif". $_FILES['userfile']['size']
    The size, in bytes, of the uploaded file. $_FILES['userfile']['tmp_name']
    The temporary filename of the file in which the uploaded file was stored on the server. 然后你进行相关文件处理就可以了。
      

  3.   

    tntxhy(落日使者)  这个不是解决的方法吧.   那个意识是提示,没找到.
      

  4.   

    这人办法不行吧!问题在于linux不能识别C:\\apache\\htdocs\\images\\3_08_new_4.gif这个路径!因为如果服务器端也是windows运行很正常。
      

  5.   

    为什么会要这个路径?
    上传文件会放置在服务器端的设定的临时上传文件保存的目录。
    不应该会要这个路径。
    tntxhy(落日使者)的方法应该是对的。
      

  6.   

    但是我是从windows上上传的呀!要传的这个文件在windows上呀!
      

  7.   

    服务器端是linux,客户端是windows,够清楚了吧!