关于PHP动态生成HTML文件问题 各位大侠:PHP怎样将从数据库中读取的内容生成静态HTML文件,而且能够随着数据库的更新而更新呢,帮忙解决,要源码,谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 类似于这样就行了,然后将返回值打印function viewbanner($bid=1,$width=0,$height=0){ global $db,$table_banners; $query=$db->query("SELECT * FROM $table_banners WHERE bid=$bid"); $str=''; if($dbq_rec=$db->fetch_array($query)) { if($dbq_rec['type']=='img') { $width=($width==0)?" ":"width='".$width."'"; $height=($height==0)?" ":"height='".$height."'"; $str.="<a target=_blanket href='".$dbq_rec['siteurl']."'>"; $str.="<img border=0 src='".$dbq_rec['fileurl']."' alt='".$dbq_rec['subject']."' "; $str.=$width." ".$height."></a>"; } else { // $width=($width==0)?" ":"width='".$width."'"; $str.="<object codebase='http://download.macromedia.com/pub/shockwave/cabs/Flash/swFlash.cab#3,0,0,0' width='".$width."' height='".$height."'>"; $str.="<param name='SRC' value='".$dbq_rec['fileurl']."'>"; $str.="<embed src='".$dbq_rec['fileurl']."' quality=high "; $str.="pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'"; $str.=" type='application/x-shockwave-flash' width='".$width."' height='".$height."'>"; $str.="</embed></object>"; } } unset($query);unset($dbq_rec); //showmessage($str); return $str;} 每5个循环输出怎么写啊? 求问php表单传值该怎么写啊? PHP中怎么读取数字证书中的信息,比如证书ID等,在线等,急~~~ 页面使用GBK,数据库使用utf8,乱码怎么解决? php中的return后的语句 PHP+MSSQL 执行T-SQL语句,有问题 nginx下的重定向配置 散分,谁要就来拿,那个垃圾mn就别眼红了 为什么得不到Form的值? 关于XXX.php?id=,XXX.php中的变量id可用的条件是什么? 想给自己的PHP实力立一个标准 在php中调用已有的函数缺少返回值
function viewbanner($bid=1,$width=0,$height=0)
{
global $db,$table_banners;
$query=$db->query("SELECT * FROM $table_banners WHERE bid=$bid");
$str='';
if($dbq_rec=$db->fetch_array($query))
{
if($dbq_rec['type']=='img')
{
$width=($width==0)?" ":"width='".$width."'";
$height=($height==0)?" ":"height='".$height."'";
$str.="<a target=_blanket href='".$dbq_rec['siteurl']."'>";
$str.="<img border=0 src='".$dbq_rec['fileurl']."' alt='".$dbq_rec['subject']."' "; $str.=$width." ".$height."></a>";
}
else
{
// $width=($width==0)?" ":"width='".$width."'";
$str.="<object codebase='http://download.macromedia.com/pub/shockwave/cabs/Flash/swFlash.cab#3,0,0,0' width='".$width."' height='".$height."'>";
$str.="<param name='SRC' value='".$dbq_rec['fileurl']."'>";
$str.="<embed src='".$dbq_rec['fileurl']."' quality=high ";
$str.="pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'";
$str.=" type='application/x-shockwave-flash' width='".$width."' height='".$height."'>";
$str.="</embed></object>";
}
}
unset($query);unset($dbq_rec);
//showmessage($str);
return $str;
}