AmMrWu

a fish.

导航

08 2012 档案

php中模版生成html的原理
摘要://打开模版文件$file=fopen('temp.html','r');$html_content=fread($file,filesize('temp.html'));//替换模版标签$php_content=str_replace('{','<?php echo ',$html_content);$php_content=str_replace('}',';?>',$php_content);//新建php模版文件$php_temp=fopen('temp. 阅读全文

posted @ 2012-08-31 17:43 RorySmart 阅读(354) 评论(0) 推荐(0)

php和mysql web development (一) how to use php
摘要:<?php/*双引号和单引号 * php中单引号里面内容默认它为字符串 * 所以在php中对于字符串尽量使用单引号*/$str='my name is ';$str1='$str jame green';$str2="$str jame green";$str3=$str.'jame green';echo $str1. '<br/>';//无效的拼接 输出$str jame greenecho $str2. '<br/>';//my name is jame gr 阅读全文

posted @ 2012-08-21 20:18 RorySmart 阅读(220) 评论(0) 推荐(0)