|
|
|
If you try to put some PHP code in an html file (index.html for example) and the PHP code is
ignored and shown as text on the screen it simply means that your web server was not
notified of the html extension as an extension that needs to be parsed for PHP code.
For example in apache, if you have the next html file :
<html>
<body>
<center>
<?php
echo ("hi to all");
echo isset($mike);
echo("<br>");
if(isset($mike) )
{
echo "The name of the variable is ". $mike;
}
?>
Mike
</center>
</body>
</html>
and get on the screen :
"); if(isset($mike) ) { echo "The name of the variable is ". $mike; } ?> Mike
you should either look in your httpd.conf file for and add the html extension as a valid
extension that needs to be parsed.
you can also create a .htaccess file in the directory in which your html file is and add the next
line inside :
AddType application/x-httpd-php php3 html
this means that Apache will treat any .php3 file or .html file the same and will look for the code
inside and execute it.
berber
|
|
| Why do i get a "Save As" dialog box when I type in the url of a php3 file Categories : PHP Configuration, PHP, Apache, Web Servers | | | WebServerSpy checks which kind of Webserver is running, Apache, Netscape, Fasttrack, IIS, HTTP-Header, HTTP 1.0, GET, spy, WWW Categories : HTTP, Network, Apache, PHP, Web Servers | | | gd libraries make gmake php3 apache-1.3.0 gd1.3 FreeBSD-2.2
Categories : Installation, PHP, Apache, Web Servers | | | phpCMS a content-management-system written in php. Categories : Content Management, Apache, Complete Programs, Web Servers, PHP | | | Easy windows installation kit for win 9* PHP4 MySQL Apache phpMyAdmin Categories : Installation, PHP, MySQL, Apache, Web Servers | | | Logging 404 errors in your custom statistics using Apache and a PHP script. Categories : Apache, Web Servers, PHP, Errors and Logging | | | Caldera Openlinux 1.2 Standard Categories : Web Servers, MySQL, PHP, Apache, Databases | | | PHP Apache and SSL Categories : PHP, Apache, Web Servers | | | apache_lookup_uri -- Perform a partial request for the specified URI and return all info about it Categories : PHP, PHP Functions, Apache, Web Servers | | | include php3 files Categories : Filesystem, PHP, Apache, Web Servers | | | PHP4 MYSQL Authentication Script with cookie. Short & Sweet
Categories : Authentication, Apache, Cookies, PHP, MySQL | | | PostgreSQL and apache web authentication source.
Categories : Authentication, PostgreSQL, Apache, Web Servers | | | Installing Oracle support to PHP running in Apache Categories : PHP Configuration, Apache, Oracle, Databases, Web Servers | | | PHP Based Apache + Mysql Error Log Parser Categories : PHP, PHP Classes, Apache, MySQL, Log Files | | | windows nt php/3 file upload script Categories : Filesystem, PHP, IIS, WinNT, Web Servers | |
|
|
|