php <%= %>不解析,该如何处理

WBOY
Release: 2016-06-13 10:09:07
Original
902 people have browsed it

php 不解析

?>
可以解析

但是

却不解析,帮忙

------解决方案--------------------
php配置文件里没有开启 短标签
最好还是按这样写
------解决方案--------------------
在php.ini中配置 http://php.net/manual/zh/ini.core.php

asp_tags 
除了通常的 标志之外还允许使用 ASP 风格的标志 。这也包括了输出变量值的缩写 。更多信息见从 HTML 中分离一节。
------解决方案--------------------
php的话,建议还是使用标准的


?>

否则移植到其他主机的话,会出现问题。
------解决方案--------------------

//short tag
?>

//asp tag
%>

php.ini里设置一下,然后重启apache

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!