<form id="addinfo" name="add" method="POST" enctype="multipart/form-data" action="/ecms.php"><input class="pmau_input2" type=file size=25 name=morepic[] onChange="addImg(this)"/>
我再ecms.php中echo $_FILES[morepic]['tmp_name'][0];竟然是空,请问怎么回事,谢谢

解决方案 »

  1.   

    <input class="pmau_input2" type=file size=25 name=morepic onChange="addImg(this)"/> 
    echo $_FILES[morepic]['tmp_name'];不知道楼主想干什么~ 这样可以
      

  2.   

    楼主要得到一个.tmp的文件路径???我用你的代码没问题啊,可以得到路径<?
    echo $_FILES[morepic]['tmp_name'][0];
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><body>
    <form id="addinfo" name="add" method="POST" enctype="multipart/form-data" action="ecms.php"> <input class="pmau_input2" type=file size=25 name=morepic[] onChange="addImg(this)"/> 
    <input type="submit" />
    </form>
    </body>
    </html>