Re: [PHP] Displaying images

2009-05-27 Thread Michael A. Peters

Miller, Terion wrote:

I am trying to get an image to display but I get nothing if done like this:

   
Scout Photo:

   


  


If I just echo the field I do get the file name





Do you get the just the file name or the full path to the image on the 
server?


If, say, the image is at /images/jamboree/whatever.jpg but 
$row['ePhoto'] only produces whatever.jpg, try:




   Scout Photo:
   



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Displaying images

2003-02-22 Thread Sam A. Funk
Robert,

I am fairly new to php as well, but I think I may be able to help.

Unless you need to modify the images when you display them, you 
should be able to just use html to display them as thus:

--Start Code Here

/* These variables would be filled in by the information you have 
from your flat file */
$img_loc_filename = "032902.jpg";
$img_width = 300;
$img_height = 200;
$img_description = "Description Here";

echo "";

--End Code Here

Or something along those line

Sam


I'm a newbe to php and am trying to develop a routine to display artwork on
my wife's site.  I want to load from a flat file information about the
artwork and image file names of the pieces.  Then using the image file name,
I want to display the image to the browser.  I've figured out how to load
the data from the file, but I could only find ("PHP and MySQL Web
Development", Welling & Thomson) two functions to display the images:
ImageCreateFromxxx or Imagexxx.  Neither one works.  In fact, Dreamweaver MX
doesn't even show them as valid php functions.
Any suggestions would be greatly appreciated

Robert


--
 
|Sam A. Funk   http://www.samafunk.com  [EMAIL PROTECTED]|
|Wichita, KS Guitarist (self-proclaimed)Macintosh Fanatic|
|Kansas Bluegrass Associationhttp://www.kansasbluegrass.org/ |
 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Displaying images

2003-02-22 Thread Siddharth Hegde
I had the same problem. This is due to bad documentation I think. Just
ImageCreateFromxxx to imagecreatefromxxx and DW MX will show it as a
valid func AND more importantly, it will work.

Let me know if this helps

- Sid

> -Original Message-
> From: Robert Stermer-Cox [mailto:[EMAIL PROTECTED]
> Sent: Saturday, February 22, 2003 10:50 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Displaying images
> 
> Greetings, All,
> 
> I'm a newbe to php and am trying to develop a routine to display
artwork
> on
> my wife's site.  I want to load from a flat file information about the
> artwork and image file names of the pieces.  Then using the image file
> name,
> I want to display the image to the browser.  I've figured out how to
load
> the data from the file, but I could only find ("PHP and MySQL Web
> Development", Welling & Thomson) two functions to display the images:
> ImageCreateFromxxx or Imagexxx.  Neither one works.  In fact,
Dreamweaver
> MX
> doesn't even show them as valid php functions.
> 
> Any suggestions would be greatly appreciated
> 
> Robert
> 
> 
> 
> --
> 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



RE: [PHP] Displaying images

2003-02-22 Thread Matt Honeycutt
Robert,

The image functions do indeed work, check the PHP docs for more info:

http://www.php.net/manual/en/ref.image.php

However, your server must have the GD libraries installed and PHP must be
properly configured.  The docs should be a good starting point if nothing
else.

---Matt

-Original Message-
From: Robert Stermer-Cox [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 22, 2003 11:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Displaying images


Greetings, All,

I'm a newbe to php and am trying to develop a routine to display artwork on
my wife's site.  I want to load from a flat file information about the
artwork and image file names of the pieces.  Then using the image file name,
I want to display the image to the browser.  I've figured out how to load
the data from the file, but I could only find ("PHP and MySQL Web
Development", Welling & Thomson) two functions to display the images:
ImageCreateFromxxx or Imagexxx.  Neither one works.  In fact, Dreamweaver MX
doesn't even show them as valid php functions.

Any suggestions would be greatly appreciated

Robert



--
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



Re: [PHP] Displaying images with php?

2002-06-05 Thread Miguel Cruz

On Wed, 5 Jun 2002, Ragnar wrote:
> no, you did not misunderstand. Thats the way im building the html code for
> displaying images now, but in the manual there is a lot of image-functions.
> I thought that there maybe was some better way of displaying the images..

The image functions are for building new images or for modifying existing 
images. If you already have them ready to go sitting in a directory, 
there's no point messing with anything more complicated than 

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Displaying images with php?

2002-06-05 Thread Ragnar

Thx,

no, you did not misunderstand. Thats the way im building the html code for
displaying images now, but in the manual there is a lot of image-functions.
I thought that there maybe was some better way of displaying the images..

But... hey, if this is the way it is done i guess everything is ok ;)

Thanx again!!

.Ragnar

"Nick Wilson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Ragnar declared
> > What is the best way to display images in the browser with php? If i for
> > instance have the pictures in ..\pictures\
>
> print("");
>
> Or did i misunderstand you?
> - --
> Nick Wilson //  www.explodingnet.com
>
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8/npAHpvrrTa6L5oRApm0AJ4sQ3jB12uGe3ToxMHgsKoxffon5wCfaUOI
> Yvdfm+C55uKT/JJFpfVjYeQ=
> =XZLu
> -END PGP SIGNATURE-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Displaying images with php?

2002-06-05 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Ragnar declared
> What is the best way to display images in the browser with php? If i for
> instance have the pictures in ..\pictures\

print("");

Or did i misunderstand you?
- -- 
Nick Wilson //  www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8/npAHpvrrTa6L5oRApm0AJ4sQ3jB12uGe3ToxMHgsKoxffon5wCfaUOI
Yvdfm+C55uKT/JJFpfVjYeQ=
=XZLu
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Displaying images with php?

2002-06-05 Thread Dan Hardiker

> What is the best way to display images in the browser with php? If i
> for instance have the pictures in ..\pictures\

Youre asking the wrong question. PHP doesnt display anything in the
browser... the browser does that job. What you can do is one of the
following:

1. Output content headers and fpassthru the file (see fpassthru in the
manual for more details)2. Output the HTML with a  tag with the SRC attribute 
pointing to
the image as usual.

Others on this list will be able to provide good tutorial web pages which
would do the job explaining PHP's role in displaying images in the web
browser much better than I can.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Displaying images in another page

2001-10-25 Thread Matt McClanahan

On Thu, Oct 25, 2001 at 10:30:24PM +0200, Rudi Ahlers wrote:

> I would like to setup a banned ad server, and I will need the images
> to be displayed in standard html pages, where the users don't have
> php access. Thus, they should be able to call up the image from a
> normal html page, ie:  src="http://www.adserv.webonline.co.za/phpads.php3?what=main";>
> 
> Can anyone give me some tips on howto do this? And any other tips for
> banner ad servers would be great as well.

For tips on banner ad services, I'd simply suggest looking over phpAds
and other such apps (See freshmeat.net).

Displaying images in this fashion is fairly simple.

In the html, as you've already provided, set the  to a
PHP script, possibly with a query string.  Then, your phpads.php3 would
be responsible for outputing the image data, along with the proper HTTP
header to tell the browser that you're sending it an image.



That's it.

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]