I have the following HTML template and I want to put it into a PHP file, the question I have is do I just wrap the template with <?php ?> or do I need to change around the JavaScript includes and the CSS style tag?
Here's the template
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="keywords" content=" some keywords for the bots">
<meta name="author" content="my name here">
<meta name="description" content="all about stuff here">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>site name</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="style.css" rel="stylesheet" type="text/css" media="screen">
</head>
<body onload="javascript_function()">
<script language="JavaScript" src="js_include.js"></script>
</body>
</html>
Create any php file (test.php) like and place this whole code there.
there is no PHP code in your file, wherever you want to write php code in this new php file Start php tag and write code there.
<?php
//my php code here
?>
Ref PHP Basic
You should save this file with .html or .php and use php include function() , <?php include("example.php"); ?> .
For more you want to know about file including , please check this link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With