S
sevY
hi,
was ist hier falsch? sowohl online als auch offline funktioniert das script nicht. es wird also nicht an meiner lokalen config liegen.
Die Pfade werden alle in die DB eingetragen, alles funktioniert. Nur leider wird keine Datei kopiert. Ordnerrechte sind proforma auf 777.
Jemand eine Ahnung?
Liebe Grüße
Coffee
was ist hier falsch? sowohl online als auch offline funktioniert das script nicht. es wird also nicht an meiner lokalen config liegen.
PHP:
<html>
<head>
<title>motul Datenbank Administration | Mediadaten</title>
<link rel=stylesheet href=../admin.css>
<meta-http-equiv=expires content=0>
<meta-http-equiv=Pragma content=no-cache>
</head>
<body>
<?php
require_once("../../_config.php");
$db_contact="motul_media";
if ($_POST[action]==upload)
{
$logopfad="media/img/logo/";
$downloadpfad="media/downloads/";
$logoinsert=$logopfad.$_FILES['motul_media_navigation_new']['name'];
$downloadinsert=$downloadpfad.$_FILES['motul_media_downloadlink_new']['name'];
if (!$_EMPTY[motul_media_navigation_new] AND eregi("(jpg|jpeg)$",$_FILES['motul_media_navigation_new']['name']))
{
move_uploaded_file($_FILES['motul_media_navigation_new']['name'],$logopfad);
}
else
{
echo "Es wurde kein Medialogo hinzugefügt. Sie haben keine Datei ausgewählt oder keinen gültigen Dateityp (non-progressives jpg,jpeg) gewählt.<p>";
}
if(!$_EMPTY[motul_media_downloadlink_new])
{
move_uploaded_file($_FILES['motul_media_downloadlink_new']['name'],$downloadpfad);
}
else
{
echo "Es wurde kein Downloadobjekt hinzugefügt. Sie haben keine Datei ausgewählt.<p>";
}
$read=mysql_query("select motul_media_shorttext from $db_contact where ID_motul_media = '1'",$handler);
$a=mysql_fetch_array($read);
mysql_db_query($db_dbase,"insert into $db_contact (motul_media_shorttext,motul_media_navigation,motul_media_downloadlink,motul_media_downloadlink_name) VALUES ('$a[motul_media_shorttext]','$logoinsert','$downloadinsert','$_POST[motul_media_downloadlink_name_new]')");
}
?>
<form enctype=multipart/form-data action=motul_media_new.php method=post>
<input type=hidden name=action value=upload>
<b>Medialogo:</b><br><p>
<input type=file name=motul_media_navigation_new><p>
<b>Downloadobjekt:</b><p>
<input type=file name=motul_media_downloadlink_new><p>
<b>Bezeichnung des Downloadlinks:</b><p>
<input type=text name=motul_media_downloadlink_name_new maxsize=60 size=55 value=DOWNLOAD PDF><br><p>
<input type=submit value=hinzufügen>
</form>
<a href=motul_media_new.php target=self>reset</a>
</body>
</html>
Die Pfade werden alle in die DB eingetragen, alles funktioniert. Nur leider wird keine Datei kopiert. Ordnerrechte sind proforma auf 777.
Jemand eine Ahnung?
Liebe Grüße
Coffee
Zuletzt bearbeitet von einem Moderator: