RE: [PHP] to include php file into html file
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Wed, 15 Aug 2001 03:23:03 +0000 |
| Subject: | RE: [PHP] to include php file into html file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-62745@lists.php.net to get a copy of this message | ||
Well,
It seems your web server is setup not to parse .html files as php
If you are running apache, then add configure it to correctly parse the
<?php in all files.
php.net has ample doc's about that, as does apache.
If you are running IIS or PWS, then get any of the millions of people with
root access to fix the extension parsing for you.
Or
Either rename your html with a .php extension.
Do whatever is simpler for you.
-----Original Message-----
From: Jack [mailto:jacky@activelifestyle.com]
Sent: August 15, 2001 11:20 PM
To: Lawrence.Sheed@dfait-maeci.gc.ca; php-general@lists.php.net
Subject: Re: [PHP] to include php file into html file
I also tried
<?php include "myphp.php;"?>
into my html page, and it appears that nothing happen at all,. Looks like
the html page does not recognize the php tag. Is there any other way that
one can include a php file into a html file?
Jack
jacky@activelifestyle.com
"Love your enemies, it will drive them nuts"
----- Original Message -----
From: <Lawrence.Sheed@dfait-maeci.gc.ca>
To: <jacky@activelifestyle.com>; <php-general@lists.php.net>
Sent: Tuesday, August 14, 2001 10:04 PM
Subject: RE: [PHP] to include php file into html file
> Try
>
> <?php include "/include/adjs.php"; ?>
>
> in your html file to include some php code in there
>
>
> [1]Javascript is a rather sh*tty client side language, it doesn't parse
php
> very well.
> [2]<script language='JavaScript' src='/include/adjs.php></script>
> ^^^^^^^^^^^^^^^^^^^^^
> Warning unterminated tag...
>
>
> Cheers,
>
> Lawrence.
>
> -----Original Message-----
> From: Jack [mailto:jacky@activelifestyle.com]
> Sent: August 15, 2001 11:00 PM
> To: php-general@lists.php.net
> Subject: [PHP] to include php file into html file
>
>
> Hi people
> I have tried to include php file into html page using the syntax below and
> it said syntax error at this part when the page is loaded. What is wrong
> with calling php file this way? Or is there any other way to call php file
> from html page?
>
> *******************
> <html>
> <body>
> <script language='JavaScript' src='/include/adjs.php></script>
> </body>
> </html>
> *******************
> Jack
> jacky@activelifestyle.com
> "Love your enemies, it will drive them nuts"
>