Home > Article > Backend Development > What three types of code can be included in a PHP program?
What three types of codes can be included in a PHP program?
The codes that can be included are html, css, and JavaScript. When using the mixed writing method, the file name needs to end with .php, otherwise the PHP code cannot be parsed normally.
index.php:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <style> /*css*/ body{ background: #eee; } </style> </head> <body> <!-- html --> <p>html</p> <!-- JavaScript --> <script> alert(123); </script> </body> </html> <?php echo 'www.php.cn'; ?>
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of What three types of code can be included in a PHP program?. For more information, please follow other related articles on the PHP Chinese website!