最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 模板标签入门教程[file_get_content]
时间:2009-06-09 编辑:简简单单 来源:一聚教程网
function GetContent($type){
if( $type )
{
if(file_exists('./mail_room.html') )
{
$content = file_get_contents( './mail_room.html');
}
else
{
ShowMsg('file can' read fail ');
}
}
else
{
if( file_exists( './mail_person.html') )
{
$content = file_get_contents( './mail_person.html');
}
else
{
ShowMsg('person file read fail!');
}
}
return $content;
}
function template($str)
{
$_url = $_SERVER['HTTP_HOST'];
$_temp = str_replace('{username}',$_SESSION['uname'],$str);
$_temp = str_replace('[bgpic]',getPic(),$_temp);
$_temp = str_replace('{url}',$_url,$_temp);
return $_temp;
}
我们来看看模板文件
-
上一个: 发送邮件代码-php 发送邮件代码
-
下一个: php 生成3D饼形状数据统计图
相关文章
- PHP输入流 php://input与POST/GET的区别 04-27
- php报错file_get_contents(): php_network_getaddresses问题 09-05
- PHP Warning: file_get_contents failed to open stream解决办法 06-25
- php中func_get_arg,func_get_args,func_num_args实现伪重载 11-07
- php提示Warning: file_get_contents(): couldn’t resolve 07-05
- 解决php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution错误 05-02