[英]PHP include doesn't work in HTML
The following html does not produce any response from the included php file. 以下html不会从包含的php文件中产生任何响应。
<!DOCTYPE html>
<html>
<body>
Here is some text. <br>
<?php include 'hello.php'; ?>
</body>
</html>
The hello.php file contains the ubiquitous <?php echo "Hello world!"; ?>
hello.php文件包含无处不在的
<?php echo "Hello world!"; ?>
<?php echo "Hello world!"; ?>
Additional info: 附加信息:
at the end or first of your html page add this o see what is disrupting: 在您的html页面的末尾或第一行添加以下内容,以查看正在破坏的内容:
<?php error_reporting(-1); ?>
and this for your include: 这包括:
<?php include("file.php"); ?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.