RE: [PHP] URGENT: Can't see picture
| From: | Jason Lotito | Date: | Thu, 15 Mar 2001 08:24:28 +0000 |
| Subject: | RE: [PHP] URGENT: Can't see picture | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43964@lists.php.net to get a copy of this message | ||
It might not be it, but this stood out...
<?PHP
$filedir = "../userpics";
//check for jpg format
if($fupload_type == "image/pjpeg")
{
//copy picture to new directory
if(copy($fupload, "$filedir/$CUserName.jpg"))
{
//show picture
// You forgot the closing '>' tag...and you are escaping the '"'
print ("<img src=\"$filedir/$CUserName.jpg\">");
}
}
?>
Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.
> -----Original Message-----
> From: Mike Yuen [mailto:myuen@ucalgary.ca]
> Sent: Wednesday, March 14, 2001 9:01 PM
> To: php-general@lists.php.net
> Subject: [PHP] URGENT: Can't see picture
>
>
> I'm having a ton of trouble trying to get pictures to display. At first,
> I thought I had the problem fixed - but that's because the pictures reside
> on my machine. So instead of providing a path to the pictures like:
> c:/phpweb/userpics/ I tried absolute paths like ../userpics and that
> doesn't seem to have worked either.
>
> Here's a snippet of my code and i'm hoping someone can help me out on
> this.
>
> Thanks,
> Mike
>
> <?PHP
> $filedir = "../userpics";
>
> //check for jpg format
> if($fupload_type == "image/pjpeg")
> {
> //copy picture to new directory
> if(copy($fupload, "$filedir/$CUserName.jpg"))
> {
> //show picture
> print ("<img src=\"$filedir/$CUserName.jpg\");
> }
> }
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>