PHP echo 输出html 代码

| | Comments (0)



      有时候,在PHP文件中不需要什么特殊设置,一般用 echo数字字符等,但是如果是包含超链接等的类似html 代码,按照普通的方法是行不通,今天贴一个自己验证过确实可以使用的PHP echo 输出HTML代码的正确方法:


<?php
echo <<< aBc
<html></html>
aBc;

?>

其中aBc这个字符是随便起的名字,可以自己娶,但要注意上下两个要一模一样,包括大小写等,<html></html>这个里面自己插入要显示的html代码,包括css等都可以包含在内。

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on January 31, 2010 8:50 PM.

费德勒3-0穆雷澳网4度封王 16座大满贯创历史 was the previous entry in this blog.

关于excel多条件求和多样化方式的补充说明 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.