Home  >  Article  >  Backend Development  >  What three types of code can be included in a PHP program?

What three types of code can be included in a PHP program?

angryTom
angryTomOriginal
2019-10-18 16:02:563526browse

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 &#39;www.php.cn&#39;;
?>

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more