Converting an HTML to a PHP file
I designed an order form using pForm. It is an HTML/CSS auto开发者_如何学运维mated code. But now I think, it should be a PHP file because I need to add PHP code into it.
If I add just when the HTML file starts and at the end, probably HTML will stop working.
How to change this file to a PHP file and also preserve its present look and feel?
You can literally change the file extension to ".php".
Then you can pepper your new php file with php code like so:
<html>
<head></head>
<body>
<?php
echo 'Hello world!<br />' ;
?>
</body>
</html>
just change the extension to php
and you can add any PHP code using tags. this doesnt need to be in the top but in any place of the code :)
精彩评论