$_FILES['upfile']['name']你可以用print_r($_FILES);来查看

解决方案 »

  1.   

    <?phpinclude("config.php");if ($submit):   $sql = "INSERT INTO test images='$upfile[name]'";
      if (@mysql_query($sql)) {
        echo("");
      } else {
        echo("<p>Error adding images: " .
             mysql_error() . "</p>");
      }else:
    ?>
    <table width="782" border="0" cellpadding="0" cellspacing="0">
      <form action="<?=$PHP_SELF?>" method="post"> 
      <tr>
        <td width="17%" valign="top" bgcolor="#E4E4E4">upload相关图片:</td>
                      <td width="83%"> 
                        <input type="file" name="upfile" size="28">
                      </td>
      </tr> 
      <tr>
       <td height="35"> 
        <div align="left">
          &nbsp;&nbsp;<input type="submit" name="submit" value="提交" />
          </div>
            </td>
            </tr> </form>
    </table>
    <?php endif; ?>
      

  2.   

    print_r($_FILES['upfile']);
    找一找什么是你需要的
      

  3.   

    basename($upfile);
    用这个就可以楼上很多人都理解错楼主的意思了。。只有 wxq4100798(aa) 的是正解