Mohammad-tashi
جمعه 01 آبان 1394, 09:08 صبح
باسلام و تقدیم احترام
من میخام از یکفرم دو فایل رو آپلود کنم گه قراره هرفایلی در یک پوشه خاص بره (البته فعلا هردو رو یکی گذاشتم)
سوال من اینجاست که چرا کد پایین ارر میده
هرچی نگاه میکنم مشکلی نداره...
<a href="#newvid" id="jointop"><input type="button" value="درج ویدئو جدید" class="blue"/></a>
<br/>
<!---- POPUP #2 ----->
<a href="#x" class="overlay" id="newvid"></a>
<div class="box">
<?php
$target_path1 = "vid/";
$target_path2 = "vid/";
$target_path1 = $target_path1 . basename( $_FILES['file1']['name']);
$target_path2 = $target_path2 . basename( $_FILES['file2']['name']);
if(move_uploaded_file($_FILES['file1']['tmp_name'], $target_path1)) {
echo "<p>The file 1". basename( $_FILES['file1']['name']).
" has been uploaded</p>";
} else{
echo "<p>There was an error uploading the file, please try again!</p>";
}
if(move_uploaded_file($_FILES['file2']['tmp_name'], $target_path2)) {
echo "<p>The file ". basename( $_FILES['file2']['name']).
" has been uploaded</p>";
} else{
echo "<p>There was an error uploading the file, please try again!</p>";
}
?>
<form id="form1" name="form1" method="post" action="" enctype="multipart/form-data">
<table width="300" border="0" cellspacing="3" cellpadding="3">
<tr>
<td colspan="2">Dual Upload in 2 addresses</td>
</tr>
<tr>
<td width="80">File 1 :</td>
<td width="199"><input type="file" name="file1" id="file1" /></td>
</tr>
<tr>
<td>File 2 :</td>
<td><input type="file" name="file2" id="file2" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit1234" value="Submit" /></td>
</tr>
</table>
</form>
دوبار این ارر چاپ میشه
There was an error uploading the file, please try again
لطفا راهنمایی نمایید
من میخام از یکفرم دو فایل رو آپلود کنم گه قراره هرفایلی در یک پوشه خاص بره (البته فعلا هردو رو یکی گذاشتم)
سوال من اینجاست که چرا کد پایین ارر میده
هرچی نگاه میکنم مشکلی نداره...
<a href="#newvid" id="jointop"><input type="button" value="درج ویدئو جدید" class="blue"/></a>
<br/>
<!---- POPUP #2 ----->
<a href="#x" class="overlay" id="newvid"></a>
<div class="box">
<?php
$target_path1 = "vid/";
$target_path2 = "vid/";
$target_path1 = $target_path1 . basename( $_FILES['file1']['name']);
$target_path2 = $target_path2 . basename( $_FILES['file2']['name']);
if(move_uploaded_file($_FILES['file1']['tmp_name'], $target_path1)) {
echo "<p>The file 1". basename( $_FILES['file1']['name']).
" has been uploaded</p>";
} else{
echo "<p>There was an error uploading the file, please try again!</p>";
}
if(move_uploaded_file($_FILES['file2']['tmp_name'], $target_path2)) {
echo "<p>The file ". basename( $_FILES['file2']['name']).
" has been uploaded</p>";
} else{
echo "<p>There was an error uploading the file, please try again!</p>";
}
?>
<form id="form1" name="form1" method="post" action="" enctype="multipart/form-data">
<table width="300" border="0" cellspacing="3" cellpadding="3">
<tr>
<td colspan="2">Dual Upload in 2 addresses</td>
</tr>
<tr>
<td width="80">File 1 :</td>
<td width="199"><input type="file" name="file1" id="file1" /></td>
</tr>
<tr>
<td>File 2 :</td>
<td><input type="file" name="file2" id="file2" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit1234" value="Submit" /></td>
</tr>
</table>
</form>
دوبار این ارر چاپ میشه
There was an error uploading the file, please try again
لطفا راهنمایی نمایید