PHP in HTML
Posted: Fri Jul 11, 2003 2:33 am
Hi,
I'm a newbie to PHP and from what I saw it seems impossible to use PHP code in a .html file unless you configure the server to parse html files as php.
However, if there is a function in a php file, let's call it function.php, and I want to acces it from, say, example.html, is it possible to include in the latter <script language="php" src="function.php></script> at the point where I want to implement it?
Why wouldn't that work?
Thanks.
I'm a newbie to PHP and from what I saw it seems impossible to use PHP code in a .html file unless you configure the server to parse html files as php.
However, if there is a function in a php file, let's call it function.php, and I want to acces it from, say, example.html, is it possible to include in the latter <script language="php" src="function.php></script> at the point where I want to implement it?
Why wouldn't that work?
Thanks.