Upload Script
- witzigerkiller
- Gesperrt
- Beiträge: 878
- Registriert: 05.02.2005 13:27
- Wohnort: Sonthofen
Upload Script
Hallo, ich bastel gerade an einem CMS, und für die Category Referenzen, brauche ich noch ein einfaches Upload Script, wo ich das Bild wählen kann, dann wird es hochgeladen, und ein link zu dem bild wird mit ausgegeben.
Am besten wäre es wenn es noch so eine automatische verkleinerung auf 100 * 100 geben würde.
Aber muss nciht sein.
Vielen Danke
Am besten wäre es wenn es noch so eine automatische verkleinerung auf 100 * 100 geben würde.
Aber muss nciht sein.
Vielen Danke
Bitte keine Anfragen mehr per PN
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
-
- Mitglied
- Beiträge: 107
- Registriert: 12.08.2005 14:22
- Wohnort: Leverkusen
- Kontaktdaten:
Das hier ist ganz gut. Automatische Skallierung hat das Teil leider nicht, aber ansonsten funktioniert es einwandfrei.
- witzigerkiller
- Gesperrt
- Beiträge: 878
- Registriert: 05.02.2005 13:27
- Wohnort: Sonthofen
Sorry, ich will kein ganzes System, lediglich ein kleines FOrmular like:
welches dann von einem script abgefragt wird, und hochgeladen wurde. Und nur 1 Datei nicht gleich3...
Sorry wenn ich so mecker, aber ich will eigentlich möglichst 2 mind. 1 datei, mit solch einem script.
Code: Alles auswählen
<form action="#" method="post">
<input type="file" name="file">
<input type="submit...:">
</form>
Sorry wenn ich so mecker, aber ich will eigentlich möglichst 2 mind. 1 datei, mit solch einem script.
Bitte keine Anfragen mehr per PN
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
- witzigerkiller
- Gesperrt
- Beiträge: 878
- Registriert: 05.02.2005 13:27
- Wohnort: Sonthofen
habe nun dieses script:
man hat mir gesagt ich ´muss keine ftp verbindung aufbauen, und bekomme aber diese fehlermeldung:
Code: Alles auswählen
<?PHP
$tempname = $_FILES['file']['tmp_name'];
$name = "upload/canro/".$_FILES['file']['name'];
$type = $_FILES['file']['type'];
if (isset($_POST['hoch']))
{
if (copy($tempname, $name))
{
echo "Datei Erfolgreich Hochgeladen<br /><br />
Link: www.canro.de/".$name;
}
else
{
die ("Fehler beim Hochladen");
}
}
?>
<form name="upload" enctype="multipart/form-data" action="#" method="post">
<table width="60%" align="center">
<tr>
<td>Banner:</td>
<td><input type="file" name="file"></td>
</tr>
</table>
<table width="60%" align="center">
<tr>
<td align="center"><input type="submit" value="Hochladen" name="hoch" /></td>
</tr>
</table>
</form>
Muss ich nun etwa doch eine aufbauen, oder was heißt diese fehlermeldung?Warning: copy(): open_basedir restriction in effect. File(/tmp/phphx3w89) is not within the allowed path(s): (/var/www/canro.de) in /var/www/canro.de/ACP/Upload.php on line 8
Fehler beim Hochladen
Bitte keine Anfragen mehr per PN
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
witzigerkiller hat geschrieben:habe nun dieses script:
man hat mir gesagt ich ´muss keine ftp verbindung aufbauen, und bekomme aber diese fehlermeldung:Code: Alles auswählen
<?PHP $tempname = $_FILES['file']['tmp_name']; $name = "upload/canro/".$_FILES['file']['name']; $type = $_FILES['file']['type']; if (isset($_POST['hoch'])) { if (copy($tempname, $name)) { echo "Datei Erfolgreich Hochgeladen<br /><br /> Link: www.canro.de/".$name; } else { die ("Fehler beim Hochladen"); } } ?> <form name="upload" enctype="multipart/form-data" action="#" method="post"> <table width="60%" align="center"> <tr> <td>Banner:</td> <td><input type="file" name="file"></td> </tr> </table> <table width="60%" align="center"> <tr> <td align="center"><input type="submit" value="Hochladen" name="hoch" /></td> </tr> </table> </form>
Muss ich nun etwa doch eine aufbauen, oder was heißt diese fehlermeldung?Warning: copy(): open_basedir restriction in effect. File(/tmp/phphx3w89) is not within the allowed path(s): (/var/www/canro.de) in /var/www/canro.de/ACP/Upload.php on line 8
Fehler beim Hochladen
du bastelst an einem cms und weißt nichtmal was die fehlermeldung heißt?!witzigerkiller hat geschrieben: ich bastel gerade an einem CMS

- witzigerkiller
- Gesperrt
- Beiträge: 878
- Registriert: 05.02.2005 13:27
- Wohnort: Sonthofen
Doch, zum teil, das der diesen BAsispfad nicht öffnen kann, aber ich habe schon alles ausprobiert.
EDIT: Wäre mal dankbar für hilfreiche Antworten, nciht nur solche Wichtigtuer
EDIT: Wäre mal dankbar für hilfreiche Antworten, nciht nur solche Wichtigtuer
Bitte keine Anfragen mehr per PN
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
- witzigerkiller
- Gesperrt
- Beiträge: 878
- Registriert: 05.02.2005 13:27
- Wohnort: Sonthofen
- witzigerkiller
- Gesperrt
- Beiträge: 878
- Registriert: 05.02.2005 13:27
- Wohnort: Sonthofen
naja, was heißt befugnisse? dieses script liegt net auf meinem server. das ist auf so nem server, wo man so ordner hat ähnlich bei confixx hostern
Bitte keine Anfragen mehr per PN
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.
When you get me on my nerven I put you in the Gully and do the Deckel drüf and you never will come back to the Tageslicht.