Home > php教程 > php手册 > body text

让Tomcat解析php

WBOY
Release: 2016-06-13 10:44:25
Original
1464 people have browsed it

需要工具:
(1) apache tomcat
(2) Quercus
 
Quercus在web-inf/lib/下的jar包,放到$TOMCAT_HOME/lib下面,修改$TOMCAT_HOME/conf/web.xml文件,加入如下 servlet映射:
Xml代码 
 
Quercus Servlet 
com.caucho.quercus.servlet.QuercusServlet 
 
 
 
 
 
 
Quercus Servlet 
*.php 
 
 
OK,重启tomcat

在以前部署的jsp项目中添加一个php页面,然后访问页面就是
php页面,内容如下:
Php代码 
echo "Hello World"; 
phpinfo(); 
?> 

作者“irfen”
 

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template