add pictures to .............

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sashy
Forum Newbie
Posts: 2
Joined: Wed Mar 10, 2004 8:22 am

add pictures to .............

Post by sashy »

what does this mean?

copy($Pic["tmp_name"], "bilder/".$Namn."_".$Pic["name"]);
$_SESSION["WhosPic"]="bilder/".$Namn."_".$Pic["name"];
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

copy($Pic["tmp_name"], "bilder/".$Namn."_".$Pic["name"]);

means "copy $pic file to "bilder" folder $namn as name.

$_SESSION["WhosPic"]="bilder/".$Namn."_".$Pic["name"];

is a session var, it prolly is used somewhere else in the script or the site.
sashy
Forum Newbie
Posts: 2
Joined: Wed Mar 10, 2004 8:22 am

Post by sashy »

well thanks=) but when we try to load up a pic, we get the following error message:

Warning: copy(bilder/sashy_silverright2.jpg): failed to open stream: Permission denied in /home/web0231/public_html/GESTBOK/hanteraAndra.php on line 98


Could u pls help us understand this.....
:roll:
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

just make sure bilder folder is there, if its not make it.

also, chmod it to 0777, most ftp progs can do this.
Post Reply