<b>REGISTER</b>

GFX-Sector - PHP, MySQL


 
GFX-Sector » Coding Area » Webentwicklung » PHP, MySQL » [SOLVED] [PHP] move_uploaded_file funktioniert nicht » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites

PHP, MySQL

Themen rund um die serverseitige Programmierung mit PHP in Verbindung mit der Datenbanksoftware MySQL
Post New Thread Post Reply

[SOLVED] [PHP] move_uploaded_file funktioniert nicht

     Deutsche Version  English version
Author
Post « Previous Thread | Next Thread »

Kielo Kielo is a female
Weichzeichner


Kielo hat kein Avatar

Registration Date: 08.01.2010
Posts: 74
Location: Schweiz
Program: Photoshop, GIMP, Apophysis, UltraFractal
Deviantart: woronheart

Spacer
[SOLVED] [PHP] move_uploaded_file funktioniert nicht

[SOLVED] [PHP] move_uploaded_file funktioniert nicht

      

jaja, ich mal wieder mit dem Bilderupload.

Ich hab jetzt so n formular, und nach dem Upload soll das Bild verschoben werden, also mit move_uploaded_file.
Sieht so aus:
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
$uploadPath "shop";
            $picName $_FILES['bild']['name'];
            $picType $_FILES['bild']['type'];
            $picTmpName $_FILES['bild']['tmp_name'];
            $oPqry mysql_fetch_array(mysql_query("select `path` from `msh_shop` where `id` = '$SQLentry'"));
            $oldPath $oPqry['path'];
if ($picName != "" && stristr($picType,"image")){
                $picName time() . "_$picName";
                $sqlPicPath "$uploadPath/$picName";
                move_uploaded_file($picTmpName,$sqlPicPath) or die ("error");
                if (!stristr($oldPath,"none.jpg")){
                    unlink($oldPath);
                }
                update($sqlPicPath,"path",$SQLentry,'`msh_shop`');
            }


Das or die(); ist zu Testzwecken, und siehe da, beim move_uploaded_file stirbt das ganze denn auch.

Kann mir da vll. irgendwer helfen? Ich seh das Problem irgendwie grad überhaupt nicht.

This post has been edited 1 time(s), it was last edited by Kielo: 20.04.2010 23:12.

[SOLVED] [PHP] move_uploaded_file funktioniert nicht 20.04.2010 11:50 Kielo is offline Homepage of Kielo Search for Posts by Kielo

Fireball Fireball is a male
Boardchef


Avatar von Fireball

Registration Date: 11.11.2006
Posts: 16,355
Classing-Rank: GFX-Sector
Location: Bremen, Deutschland
Program: Adobe Photoshop CS2
Deviantart: oenismaster
Forums: (alle)

Spacer
      

Du solltest den Inhalt der Variable $uploadPath mal umändern in

php:
1:
$uploadPath "./shop";
.
Vielleicht gehts dann schon

Wenn du das or die ("error"); rausnimmst, sollte bei move_uploaded_file() aber auch nen Fehler kommen, wenn es nicht funktioniert, da du vor move_uploaded_file kein @ hast (zur Unterdrückung des Fehlers).
Ansonsten schreib mal error_reporting(E_ALL); direkt unter <?php Wink



[SOLVED] [PHP] move_uploaded_file funktioniert nicht 20.04.2010 16:36 Fireball is offline Homepage of Fireball Search for Posts by Fireball

Kielo Kielo is a female
Weichzeichner


Kielo hat kein Avatar

Registration Date: 08.01.2010
Posts: 74
Location: Schweiz
Program: Photoshop, GIMP, Apophysis, UltraFractal
Deviantart: woronheart

Thread Starter Thread Started by Kielo
Spacer
      

Hm, danke für den Input.

Das Problem war jedoch viel... rudimentärer.
chmod hat geholfen, apache muss da ja reinschreiben können...

[SOLVED]

PS.:
Error reporting habe ich im index.php file gleich über alles drüber smile

[SOLVED] [PHP] move_uploaded_file funktioniert nicht 20.04.2010 23:11 Kielo is offline Homepage of Kielo Search for Posts by Kielo
 
Spacer
   
GFX-Sector
unregistered


 hat kein Avatar


Spacer

Have you enjoyed this topic?


If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.

After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.

In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.

Sign up now and enjoy the advantages as a registered member.

(This website will be ad-free after a complete free sign up.)

New Post 20.04.2010 23:11  
Tree Structure | Board Structure
Post New Thread Post Reply
GFX-Sector » Coding Area » Webentwicklung » PHP, MySQL » [SOLVED] [PHP] move_uploaded_file funktioniert nicht

Similar topics to [SOLVED] [PHP] move_uploaded_file funktioniert nicht
Thread
[Problem] Verlaufsumsetzung nicht radieren (Forum: Fragen & Probleme)
Ich Wars Wirklich Nicht !!!!! (Forum: Signaturen/Avatare)
come on move it (Forum: Signaturen/Avatare)
Tastatur funktioniert nicht richtig. (Forum: Archiv)
Grün oder blau ich weis nicht genau :D (Forum: Signaturen/Avatare)