<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_61728"> <div class="blockcode"> <div id="code_TAp"><ol> <li><html></li> <li> </li> <li> <head></li> <li> <title>File Uploader</title></li> <li> </head></li> <li> </li> <li> <body></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> <li> <input type="file" name="file" size="45"></li> <li> <br></li> <li> <input type="submit" value="Upload File"></li> <li> </form></li> <li> </li> <li> </body></li> <li> </li> <li></html></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> if( $_FILES['file']['name'] != "" )<li> {<li> copy ( $_FILES['file']['tmp_name'],<li> "C:/Apache/htdocs/" . $_FILES['file']['name'] )<li> or die( "Could not copy file" );<li> }<li> else<li> {<li> die( "No file specified" );<li> }<li> <li>?></li> <li> </li> <li><html></li> <li> </li> <li> <head></li> <li> <title>Upload complete</title></li> <li> </head></li> <li> </li> <li> <body></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 echo $_FILES['file']['name']; ?>">Click here to view file</a></li> <li> </li> <li> </body></li> <li> </li> <li></html></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>