Re: get image size function
| From: | Mukul Sabharwal | Date: | Wed, 09 Apr 2003 18:47:27 +0000 |
| Subject: | Re: get image size function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143147@lists.php.net to get a copy of this message | ||
Hi,
Try a few things, make sure the variable $i is a valid
offset (index) for the array, also, make sure that the
file names read from $data_file are "one" in each
line.
Regards,
Mukul Sabharwal
http://www.devhome.org
--- Tyler Durdin <linuxgeek23@hotmail.com> wrote:
>
>
>
>
> I ran the print_r and sure enough all of the image
> values were there. So now
> I am stuck again. This is the error message I am
> getting:
>
> Warning: getimagesize(Mvc-038f.jpg)
> [function.getimagesize]: failed to
> create stream: No such file or directory in
> /www/servers/comgo_test/gallery.php on line 47
>
> And this is line 47
>
> $image_size = getimagesize(trim($photos[$i]));
>
> These are the variables the line is referring to
> $photos = file($data_file);
> ** the datafile just has the names of 3 jpg images
> **
>
>
> >From: dempsejn@georgetown.edu
> >To: "Tyler Durdin" <linuxgeek23@hotmail.com>
> >CC: php-general@lists.php.net
> >Subject: Re: [PHP] get image size function
> >Date: Wed, 09 Apr 2003 14:17:06 -0400
> >
> >hey tyler,
> >
> >just looking at that quickly, i'd try testing it
> with print_r to see
> >the structure; if you're getting the string "Array"
> then its obviously
> >an array that you have to then select something
> from. print_r($var)
> >should make it clear.
> >
> >jack
> >
> >----- Original Message -----
> >From: "Tyler Durdin" <linuxgeek23@hotmail.com>
> >Date: Wednesday, April 9, 2003 2:13 pm
> >Subject: [PHP] get image size function
> >
> > > When I run this script:
> > >
> > > <?php
> > > $size = getimagesize
> ("pictures/pictures/bobby.jpg");
> > > echo "<img src=\"pictures/pictures/bobby.jpg\"
> {$size[3]}>";
> > > ?>
> > >
> > > I get Array (the word Array) and a picture of
> the image. Why am I
> > > not
> > > getting the image size? Did I not configure php
> to use the image
> > > functions?
> > > If that's the case how can I correct this
> problem? If it's not the
> > > case what
> > > is going on here? Please help!!!
> > >
> > >
> > >
> > >
> > >
> > >
> > >
>
_________________________________________________________________
> > > Protect your PC - get McAfee.com VirusScan
> Online
> > >
>
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit:
> http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
_________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*.
> http://join.msn.com/?page=features/virus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
*********************************
Know more about me:
http://www.geocities.com/mimodit
*********************************
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com