下面是一个简单的函数,我们是用php file_get_contents函数来读取文件mail_room.html的内容哦,好了费话不说多了我们来看看吧。
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;
}
本站原创转注明:www.jquerycn.cn/phper/php.html