Aug 24, 2023

PHP_01 (Basic)

For starting this PHP language, I use the ubuntu 22.04 server operation and place the file PHP in folder /etc/www/html , if want to edit main website and you need to edit to /etc/www/html/index.html file 

in Below is example mz_01.php is php file but with HTML language, with started with DOCTYPE, Html, Head and Body.

- Document type    : <!DOCTYPE html>
- <html>
- Head                   : <head>…..</head>
            head is started with <head> and closed with </head>
- Body                   : <body>…..</body>
- </html>


But if you want to start the PHP language, you just need to write with opened by <?php, insert item/function/variable, and closed with ?>

<?php  item  ?>


Then we continue with definition and position of Head and Body


h1, h2, h3 ...., hn is used to determine size of font, where h1 is the bigger to hn is the lowest size. 

<h1>Hello world</h1>
<h2>Hello world</h2>