On 31/07/11 08:11, LabTech wrote:
Maybe I'm ancient... but I create ALL my HTML via ECHO in PHP... then
all the includes WORK!
I set the entire HTML PAGE within <?php and ?> brackets. ECHO works! (as
does INCLUDE)
----- Original Message ----- From: "Jeroen Geilman" <jer...@adaptr.nl>
To: <users@httpd.apache.org>
Sent: Saturday, July 30, 2011 4:39 PM
Subject: Re: [users@httpd] PHP files not being parsed in HTML pages


On 2011-07-30 23:33, Stormy wrote:
At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote:
On 30/07/2011 18:43, Jeroen Geilman wrote:
>>> So, why does a simple file with phpinfo() work and an html page
with an
>>> include "xyz.php" NOT render the page as desired in the browser????
>>> It just
>>> ignores the include.
>
> HTML does not have an "include" directive.
> Please don't confuse PHP with HTML.

As an aside and for the avoidance of doubt, whilst they are not
strictly
part of HTML,

SSI are *text* in a format that can be interpreted by an HTML client.

Incorrect.
SSI stands for SERVER-Side Includes.
The client, if it ever received such content, would not know what to
do with it.


Server Side Includes (which include a #include directive)
are commonly available to plain HTML on many servers.

If php "includes" as output from the server (SSI)

PHP is not SSI.

anything that cannot be parsed as HTML [or as HTML parsable script,
js etc] by the client (browser) then it will not be "render[ed ...]
as desired in the browser????" which was the question in this thread.

"Servers" can send anything, invalid text/html from a php script,
whatever ... if the client browser cannot parse|interpret the content
it is doomed to failure.

Best - Paul

Tired old sys-admin

I'm sorry to hear that.

--
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3798 - Release Date: 07/30/11




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org




Sorry I have created such a discussion around my use of the word "include". In future I'll try to be semantically correct.

By "include" I mean lines of code like this that are embedded into the source html.

<?php include "xyz.php"; ?>

All of these files echo something back so if a user did a Ctl+U they would not see that "line" but html tags and data. Some of my php files read a database and echo back something, even if it is only "no records found".

But when I access my application via localhost and do a Ctl+U, I see those lines and not html tags and data.

If apache2 can process a file containing <?php phpinfo(); ?> and display the contents of php.ini with colourful markup, is it using the php5 "engine" or doing it all by itself??

Thanks for all of your suggestions.

Rob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to