ahmedashraf
25-03-2007, 11:15 PM
==(( بسم الله الرحمن الرحيم ))==
النهارده درس جديد وجميل وحصرى
وهو برمجه مركز رفع ملفات بلغه البى اتش بى
جميع الحقوق محفوظة ارجوكم اذكروا المصدر واسم كاتب الموضوع عند نقله
نبدا
=================================
عدد الملفات : 2
1. upload.php
2. upload_ac.php
==================================
[Only registered and activated users can see links]قم بانشاء ملف upload.php
صورة توضيحية لشكل المف :
[Only registered and activated users can see links]
ضع الكود الاتى فى الملف المنشا
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><strong>Single File Upload </strong></td>
</tr>
<tr>
<td>Select file
<input name="ufile" type="file" id="ufile" size="50" /></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Upload" /></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
او حمله من هنا 53423
=================================
[Only registered and activated users can see links]انشا الملف الاخر باسم upload_ac.php
وضع به هذا الكود
<?php
//set where you want to store files
//in this example we keep file in folder upload
//$[Only registered and activated users can see links]['ufile']['name']; = upload file name
//for example upload file name cartoon.gif . $path will be upload/cartoon.gif
$path= "upload/".$[Only registered and activated users can see links]['ufile']['name'];
if($ufile !=none)
{
if(copy($[Only registered and activated users can see links]['ufile']['tmp_name'], $path))
{
echo "Successful<BR/>";
//$[Only registered and activated users can see links]['ufile']['name'] = file name
//$[Only registered and activated users can see links]['ufile']['size'] = file size
//$[Only registered and activated users can see links]['ufile']['type'] = type of file
echo "File Name :".$[Only registered and activated users can see links]['ufile']['name']."<BR/>";
echo "File Size :".$[Only registered and activated users can see links]['ufile']['size']."<BR/>";
echo "File Type :".$[Only registered and activated users can see links]['ufile']['type']."<BR/>";
echo "<img src=\"$path\" width=\"150\" height=\"150\">";
}
else
{
echo "Error";
}
}
?>
او حمله من هنا 53424
===================================
[Only registered and activated users can see links]انشا مجلد باسم upload لحفظ المفات المرفوعة فيه واعطه تصريح 777
[Only registered and activated users can see links]
انتهى الدرس
مع تحياتى
احمد اشرف
النهارده درس جديد وجميل وحصرى
وهو برمجه مركز رفع ملفات بلغه البى اتش بى
جميع الحقوق محفوظة ارجوكم اذكروا المصدر واسم كاتب الموضوع عند نقله
نبدا
=================================
عدد الملفات : 2
1. upload.php
2. upload_ac.php
==================================
[Only registered and activated users can see links]قم بانشاء ملف upload.php
صورة توضيحية لشكل المف :
[Only registered and activated users can see links]
ضع الكود الاتى فى الملف المنشا
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><strong>Single File Upload </strong></td>
</tr>
<tr>
<td>Select file
<input name="ufile" type="file" id="ufile" size="50" /></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Upload" /></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
او حمله من هنا 53423
=================================
[Only registered and activated users can see links]انشا الملف الاخر باسم upload_ac.php
وضع به هذا الكود
<?php
//set where you want to store files
//in this example we keep file in folder upload
//$[Only registered and activated users can see links]['ufile']['name']; = upload file name
//for example upload file name cartoon.gif . $path will be upload/cartoon.gif
$path= "upload/".$[Only registered and activated users can see links]['ufile']['name'];
if($ufile !=none)
{
if(copy($[Only registered and activated users can see links]['ufile']['tmp_name'], $path))
{
echo "Successful<BR/>";
//$[Only registered and activated users can see links]['ufile']['name'] = file name
//$[Only registered and activated users can see links]['ufile']['size'] = file size
//$[Only registered and activated users can see links]['ufile']['type'] = type of file
echo "File Name :".$[Only registered and activated users can see links]['ufile']['name']."<BR/>";
echo "File Size :".$[Only registered and activated users can see links]['ufile']['size']."<BR/>";
echo "File Type :".$[Only registered and activated users can see links]['ufile']['type']."<BR/>";
echo "<img src=\"$path\" width=\"150\" height=\"150\">";
}
else
{
echo "Error";
}
}
?>
او حمله من هنا 53424
===================================
[Only registered and activated users can see links]انشا مجلد باسم upload لحفظ المفات المرفوعة فيه واعطه تصريح 777
[Only registered and activated users can see links]
انتهى الدرس
مع تحياتى
احمد اشرف