RE: [PHP] How is code in PHP interpreted,from 1st line to last? i do nt think so

2002-03-28 Thread Darren Gamble

Good day,

Please keep this conversation on the list.

As my message says, no, in HTML you don't have text and images together.
The image is retrieved from the server by the client in a completely
different request.

The main request basically says An image goes here.  Go ask over there to
go get that image.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Moschitz Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 8:58 AM
To: 'Darren Gamble'
Subject: AW: [PHP] How is code in PHP interpreted, from 1st line to
last? i do nt think so


But the problem with include tag is, that I can´t display images and text
together, or can i?

thx
martin

-Ursprüngliche Nachricht-
Von: Darren Gamble [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 28. März 2002 16:49
An: 'Moschitz Martin'; [EMAIL PROTECTED]
Betreff: RE: [PHP] How is code in PHP interpreted, from 1st line to
last? i do nt think so

Good day.

If you want some php code to execute another file of php code and the
continue afterwards, use the include() statement.

Please note that with the example you've listed there, the code isn't
executed the way that you might think.  The client will receive all of the
html from the PHP script first.  Then, the client will look at the img tag
and figured out that it has to request graf.php, which is does (which will
be executed separately).


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Moschitz Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How is code in PHP interpreted, from 1st line to last? i
do nt think so


How can I say php to execute graf.php until it´s finished and then move on
to the rest of the code?

echo img src='graf.php;
...
more code
...

tanxs

-- 
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] How is code in PHP interpreted,from 1st line to last? i do nt think so

2002-03-28 Thread Darren Gamble

Good day,

No, there is no real way in HTML to have this work.  You would be best off
looking at WHY you need the image to be done first, and change your
programming appropriately to take into account how HTML works.

A very messy solution would be to have an include statement that generates
an image someplace, referenced by your main program.  This will cause the
image to be generated before the rest of the code is executed.  But, then
you'll have to worry about cleaning it up later.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Moschitz Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 9:06 AM
To: 'Darren Gamble'; Moschitz Martin
Cc: Php
Subject: AW: [PHP] How is code in PHP interpreted, from 1st line to
last? i do nt think so


As my message says, no, in HTML you don't have text and images together.
The image is retrieved from the server by the client in a completely
different request.

The main request basically says An image goes here.  Go ask over there
to
go get that image.

so, do you have any solution for me, how i can get the image processed
first? include doesn´t work...

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