ABA


"צריך עזרה ב PHP"
גירסת הדפסה        
קבוצות דיון בניית אתרים נושא #7038 מנהל    סגן המנהל    מפקח   Winner    צל"ש   מומחה  
אשכול מספר 7038
dj-pancho

   12:24   26.09.03   
אל הפורום  
  צריך עזרה ב PHP  
 
   ערכתי לאחרונה בתאריך 26.09.03 בשעה 12:28 בברכה, dj-pancho
 
שלום לכולם
הורדתי מערכת מוכנה של העלאת קבצים ב-php ואני צריך להוסיף לה משהו

הינה הקוד שלה

 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>העלאות </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" cellspacing="2" cellpadding="2" height="100%">
<tr>
<td>
<div align="center">
<table width="550" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#336699">
<tr>
<td background="top.gif" height="60"><img src="head.gif" width="256" height="45"></td>
</tr>
<tr>
<td background="bg.gif"><table width="100%" cellpadding="5" cellspacing="5">
<tr>
<td background="bg.gif">
<form name="formen" action="uploader.php" method="post" enctype="multipart/form-data">
This scripts uploads only: *.jpg, *.gif *.png
You must give the file a name on the server. Do not forget
the ending.<br>
Max filesize: 500kb.<br>
<br>
<table width="100%" cellspacing="2" cellpadding="2">
<tr>
<td width="180" background="bg.gif">File: </td>
<td background="bg.gif">
<input type="file" name="bilde_fil">
</td>
</tr>
<tr>
<td width="180" background="bg.gif">Choose folder:</td>
<td background="bg.gif">
<select name="folder">
<option>בחר תקייה</option>
<option value="Sings/">תמונות</option>
</select>
</td>
</tr>
<tr>
<td width="180" background="bg.gif">קובץ</td>
<td background="bg.gif">
<input type="text" name="nyttnavn">
</td>
</tr>
<tr>
<td width="180" background="bg.gif">Filetype:</td>
<td background="bg.gif">
<select name="ending">
<option>.jpg</option>
<option>.png</option>
<option>.gif</option>
</select>
</td>
</tr>
</table>
<br>
<input type="submit" value="Upload" name="submit">
<input type="hidden" name="MAX_FILE_SIZE" value="500000">
<?php if ($folder == "Choose folder")
{

echo "<b>Error: </b> You must Choose a folder to upload your file.";
}?>
<?php
#Config
$path=$folder; //The file-path(remember the last '/')

#Do not edit below
if ($bilde_fil && $nyttnavn){
$ok = 1;

if (is_file($path.$nyttnavn.$ending)){
print "<b>Error</b>, the name allready exists. Choose another name.<br>";
$ok = 0;
}
if (preg_match("/^/", $nyttnavn)){
print "<b>Error</b>, Filname can't start with: '.', '/' or '\'";
$ok = 0;
}
if (!($ending == ".jpg" || $ending == ".gif" || $ending == ".zip" || $ending == ".exe" || $ending == ".rar" || $ending == ".html" || $ending == ".ace" || $ending == ".png")){
print "<b>Error</b>, do not mix with the filename ($ending) Thanks!";
$ok = 0;
}
print "";
}

if ($ok){
$res = copy($bilde_fil, $path."/".$nyttnavn.$ending);
print ($res)?"<b>Finish</b>, uploadet ".$nyttnavn.$ending."":"<b>Error</b>, could not upload the file.<br>" ;
}
?>
<br>
</form>

</td>
</tr>
</table> </td>
</tr>
<tr>
<td height="37">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" background="bottom.gif">
<div align="center">All Rights Reserved. <a href="http://www.harlemdesigns.org">Harlem
Designs</a> are Free Softwares.<br>
Copyright Harlem Designs ©2001-2003</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p class="headcell"> </p>
</div>
</td>
</tr>
</table>
</body>
</html>

אז ככה אני רוצה שזה יראה את הקישור לקובץ שהועלה אחרי שזה מסיים להעלות אותו , התקייה שאלייה המערכת מעלה את הקבצים היא /sings

תודה רבה לעוזרים , וחג שמח.


                                שתף        
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

  האשכול     מחבר     תאריך כתיבה     מספר  
  לכל מי שלא רואה את הקוד .. dj-pancho 26.09.03 12:30 1
  Up בבקשה ... תעזרו לי ... dj-pancho 26.09.03 18:02 2

       
dj-pancho

   12:30   26.09.03   
אל הפורום  
  1. לכל מי שלא רואה את הקוד ..  
בתגובה להודעה מספר 0
 
   הינה קובץ txt עם הקוד http://rotter.net/User_files/nor/3f7407201c08d4f6.txt

ושוב תודה לעוזרים


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
dj-pancho

   18:02   26.09.03   
אל הפורום  
  2. Up בבקשה ... תעזרו לי ...  
בתגובה להודעה מספר 0
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

תגובה מהירה  למכתב מספר: 
 
___________________________________________________________________

___________________________________________________________________
למנהלים:  נעל | תייק בארכיון | מחק | העבר לפורום אחר | מחק תגובות | עגן אשכול
       



© כל הזכויות שמורות ל-רוטר.נט בע"מ rotter.net