我想知道是否可以在Spring MVC页面内联编写PHP代码。
类似以下方式:
类似以下方式:
<html xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tiles="http://tiles.apache.org/tags-tiles"
xmlns:spring="http://www.springframework.org/tags"
xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" >
<jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat" />
<jsp:directive.page contentType="text/html;charset=UTF-8" />
<jsp:directive.page pageEncoding="UTF-8" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title><tiles:insertAttribute name="title"/></title>
<util:load-scripts />
<spring:message code="application_name" var="app_name" />
</head>
<body style="background-image: url(${resources}/images/Main_bg.jpg);">
<div id="wrapper">
<lang:PHP>
require_once(somephpfile.php);
...
我有一段庞大的PHP遗留代码,我想将其集成到我正在构建的更大系统中,这个新系统是用Spring和Spring MVC编写的。