<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_61728"> <div class="blockcode"> <div id="code_TAp"><ol> <li> <li> </li> <li> </li> <li> <title>File Uploader</title> </li> <li> </li> <li> </li> <li> </li> <li> <h3>File Upload</h3> </li> <li> Select a file to upload:<br> </li> <li> </li> <li> <form action="uploader.php" method="post" enctype="multipart/form-data"> <li> <input type="file" name="file" size="45"> </li> <li> <br> </li> <li> <input type="submit" value="Upload File"> </li> <li> </li> </form> </li> <li> </li> <li> </li> <li> </li> <li> </ol></div> <em onclick="copycode($('code_TAp'));">复制代码</em> </div> <br> uploader.php <div class="blockcode"> <div id="code_HZz"><ol> <li> <?php <li> </li> <li> if( $_FILES['file']['name'] != "" )</li> <li> {</li> <li> copy ( $_FILES['file']['tmp_name'],</li> <li> "C:/Apache/htdocs/" . $_FILES['file']['name'] )</li> <li> or die( "Could not copy file" );</li> <li> }</li> <li> else</li> <li> {</li> <li> die( "No file specified" );</li> <li> }</li> <li> </li> <li>?></li> <li> </li> <li> <li> </li> <li> </li> <li> <title>Upload complete</title> </li> <li> </li> <li> </li> <li> </li> <li> </li> <li> <h3>File upload succeeded...</h3> </li> <li> <ul> <li> </li> <li>Sent: <?php echo $_FILES['file']['name']; ?> </li> <li> </li> <li>Size: <?php echo $_FILES['file']['size']; ?> bytes</li> <li> </li> <li>Type: <?php echo $_FILES['file']['type']; ?> </li> <li> </li> </ul> </li> <li> </li> <li> <a href="<?php%20echo%20%24_FILES%5B'file'%5D%5B'name'%5D;%20?>">Click here to view file</a> </li> <li> </li> <li> </li> <li> </li> <li> </ol></div> <em onclick="copycode($('code_HZz'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 文件上传, PHP</div> <div id="comment_61728" class="cm"> </div> <div id="post_rate_div_61728"></div> <br><br>