Re: .php file works but php script in html file does not work

From: Date: Thu, 11 Jan 2001 18:29:41 +0000
Subject: Re: .php file works but php script in html file does not work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34061@lists.php.net to get a copy of this message
Apache does not know that you want to parse .html (anything other then .php) as php, it must be told this. Look for a line such as this, in httpd.conf : AddType application/x-httpd-php .php Add desired extensions to it, like this : AddType application/x-httpd-php .php .php3 .html .phtml .foo .blah What is added will be parsed and the code will do its thing. This assumes you're using apache but do other web servers exist? Note : http://www.php.net/manual/install-windows95-nt.php If you're running php3 then replace x-httpd-php with x-httpd-php3 in the above examples. After making changes to httpd.conf, as done above, restart apache. And note, for good measure, the following controls pretty source files : AddType application/x-httpd-php-source .phps Philip On Thu, 11 Jan 2001, Yun Wan wrote: > Hi, > > I have just installed php on my windows 98 SE OS. > and my .php file works file. However, the script of php embedded in html > file does not work. Why? > Thanks in advance! > > Yun > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#34061) next »