Are they on the web server, i/e under the web root?  If so, just show them 
as you would ANY picture in HTML.

$picture = '/path/to/picture/picture1.jpg';
$width = 100;
$height = 50;
echo "<img src=\"$picture\" width=\"$width\" height=\"$height\" 
border=\"0\" alt=\"My picture\">\n";

If they aren't then you will have to either move them to a folder under the 
web root, or do one of two workarounds: copy them to a temp file under the 
web root somewhere (which doesn't make much sense, because you will never 
really know when that file should be deleted), or extract them via PHP with 
a PHP script under your web root.

To extract them via a PHP page is a bit more difficult, but basically 
involves something like this..
<img src="/path/showpic.php?picname=picture1.jpg">
And have the script look something like this:
----showpic.php----
  header("Content-Disposition: filename=$picname");
  header("Content-Type: $file_type");
  header("Content-Length: $file_size");
  readfile("/hard_drive_path/to/file/$picname");
-------------------
That's a rough sketch.

But again, the easiest way to do it is just move the picture files onto 
somewhere on your web server and just access them like any picture, using 
the <img> tag and having PHP fill in the file name.

-Mike

At 12:28 PM 7/23/2001 +0200, Lukáš Noskievič wrote:
>I have some pictures and i cannot find the way how to show them. I know the
>name and location of the picture (d:\pictures\picture1.jpg, picture2.jpg,
>...) I want to show just one picture which name i send through web form. Can
>somebody help me?
>
>
>
>--
>PHP Windows 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]


               -=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *
  American schoolchildren today are taking four times as many
  psychiatric meds as all of the rest of the world combined.



-- 
PHP Windows 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]

Reply via email to