העלת קבצים.
עשיתי את הקוד הבאה בשביל להעלות קבצים לשרת.. אך העלה אינה מתבצעת.. הנה הקוד:
עשיתי את הקוד הבאה בשביל להעלות קבצים לשרת.. אך העלה אינה מתבצעת.. הנה הקוד:
<? if(!$_GET['Action']) { header("Location: Upload.php?Action=Main"); } ?> <Html dir=rtl> <Head> <Style> TABLE { FONT-SIZE: 9pt; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse } </Style> </Head> <Body bgcolor="#FFFFFF" text="#000000"> <BaseFont Face=Arial> <? if($_GET['Action'] == "Main") { ?> <form action="Upload.php?Action=Upload" method="Post" enctype="multipart/form-data"> <p align=center> <font size=5 color=red face=arial>מערכת העלת קבצים</font><br><Br> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <th><input type="file" size="20" name="file1"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file2"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file3"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file4"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file5"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file6"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file7"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file8"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file9"></th> </tr> <tr><td height=10></td></tr> <tr> <th><input type="file" size="20" name="file10"></th> </tr> <tr><td height=10></td></tr> <tr> <td align=center><INPUT TYPE="submit" value="שלח"></td> </tr> </table> </p> </FORM> <? } if($_GET['Action'] == "Upload") { for ($i=1 ; $i<=10 ; $i++) if(!empty($_POST['file".$i."'])) { move_uploaded_file ($_POST['file".$i."'],"/"); echo "The ".$_POST['file".$i."']." Uploaded.<br>"; } } ?> </BaseFont> </Body> </Html>
מה עלי לעשות כדי שהעלת הקבצים תעבוד?