我在tomcat里建了一个test.php,页面只能显示一部分是什么原因呀?

<htmllang="en"><head><metacharset="UTF-8"><title>aaaa</title></head><body><?phpecho"H... <html lang="en">
<head>
<meta charset="UTF-8">
<title>aaaa</title>
</head>

<body>
<?php echo "Hello World"; ?>
<br/>
this is index.php page
</body>
</html></span></strong>
这个只能显示 this is index.php page ,hello world不能显示,是什么原因啊?因为我php没有配置好吗?
展开
 我来答
蓝眯眯
2018-05-08 · TA获得超过457个赞
知道小有建树答主
回答量:513
采纳率:33%
帮助的人:165万
展开全部
tomcat不是能运行php的容器,tomcat是运行jsp的
你可以把test.php换成test.jsp
内容如下
<html>
<head>
<meta charset="UTF-8">
<title>aaaa</title>
</head>

<body>
<% out.println("Hello world!") %>
<br/>
this is index.jsp page
</body>
</html>
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式