Re: php not executing in html
| From: | Bug Hunter | Date: | Wed, 21 Jun 2000 18:47:27 +0000 |
| Subject: | Re: php not executing in html | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2525@lists.php.net to get a copy of this message | ||
by default, all php scripts only execute on .php pages. You would have
to tell apache that .html was actually a php page (in
/etc/httpd/conf/httpd.conf, look for .php). You would do something liket
this:
AddType application/x-httpd-php .html
This is a security risk, because it lets everyone embed php in any
document, and can cause problems.
bug
On Wed, 21 Jun 2000, Sean Mathews wrote:
> Heya Guys
>
> Newbie question. I have just installed php 4, I have done as it says in the
> install. When I run a file through the browser from a URL like
> http://myserver/ddd.php the script runs fine, but if I have php
> embedded in
> a html document (using <? ?>, or <script language="php"> </script>
> or <?php
> ?>tags) and call the http://myserver/ddd.html it does not
> execute the
> script. It just includes it in my html (not visible because of the tags)
> instead of processing it. Whats up?