netdoger 发表于 2014-02-16 17:42

php文件可以这样写吗?

我写了个php模板文件,我想可以这样写吗?
请看:
《!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"》
《html xmlns="http://www.w3.org/1999/xhtml"》
《head》
《title》标题-CSS网模板《/title》
《meta http-equiv="Content-Type" content="text/html; charset=gb2312" /》
《meta name="keywords" content="关键字" /》
《meta name="description" content="关键字描述" /》
《link href="css文件路径" rel="stylesheet" type="text/css" /》
《script type="text/javascript" src="JS文件路径"》《/script》
《/head》
《body》
《?php echo "《p》Hello World《/p》"; ?》
《/body》
《/html》

webdna 发表于 2014-02-16 19:44

《?php echo "《p》Hello World《\/p》"; ?》

ly1116900 发表于 2014-02-19 14:06

可以没问题吧
页: [1]
查看完整版本: php文件可以这样写吗?