SRC的问题,为什么不能调用页面内容? tt.htm要写成-----document.write ("<b>xx</b>");...document.write ("<i>xx</i>");----- 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 iframe啊,,!!!!!!!!!!!!!!!!那样怎么行,, <script language="JavaScript" src = "./ccmmn/php/tt.htm"></script>这种SRC只能引入javascript的文件 <?phprequire ("./include/config.inc.php");require "include/class_basic_record_file.php";require "include/classes.php";//参数说明:$titlelen-标题长度;$action-显示动作;$category-文章大类;$type-文章小类;// $author-是否显示作者;$date-是否显示日期;$read-是否阅读次数;// $count-显示数量//默认值处理if(empty($titlelen)) $titlelen = 20;if(empty($count)) $count = 10;$aSoft = new CSoft;$aSoft->open();if ($action == "hot") $posList = $aSoft->OrderByDownNum($category, $type); //热门文章elseif($action == "comment") $posList = $aSoft->FilterByComment($category, $type, $count); //最新推荐elseif($action == "new") $posList = $aSoft->FilterByClass($category, $type, "1", $count); //最新文章elseif($action == "class") showallclass();if (empty($setid)) $setid = 0;for($i = 0; $i < min($count, count($posList)); $i++){ $id = $posList[$i + $setid]; $aSoft->setAbsolutePosition($id); // 判断标题长度 $len = strlen($aSoft->name); if ($len <= $titlelen) $name = $aSoft->name; else { $name = substr($aSoft->name, 0, $titlelen); $parity= 0; for($j=0;$j<$titlelen;$j++) { $temp_str=substr($name,$j,1); if(Ord($temp_str)>127) $parity+=1; } if($parity%2==1) $name=substr($name,0,($titlelen-1))."..."; else $name=substr($name,0,$titlelen)."..."; } // 取出分类名称 $aClass = new CClass; $aClass->open(); $aClass->find($aSoft->class_id); $type2 = $aClass->class_name; $sort1id = $aClass->class_category_id; $aClass->close(); $aCategory = new CCategory; $aCategory->open(); $aCategory->find($sort1id); $type1 = $aCategory->category_name; $datetmp = date($set[dateformat], $aSoft->updatetime); // 显示 echo "document.write(\"<img src='{$set[sysPath]}/{$set[tplRoot]}{$set[tplMode]}/images/rss.gif'><a href='{$set[sysPath]}/index.php?modules=list&categoryid={$aSoft->category_id}&classid=$aSoft->class_id'>[$type2]</a> <a href='{$set[sysPath]}/index.php?modules=show&id=$id' title='{$aSoft->name} - {$type1}|{$type2} {$datetmp} {$aSoft->viewnum}/{$aSoft->daydowntimes}' target=_blank>$name</a> "; if($date == "yes") echo "<font color = #c0c0c0> $datetmp</font>"; if($author == "yes") echo "<font color = #c0c0c0> 文:$aSoft->empower</font>"; if($read == "yes") echo "<font color = #c0c0c0> 阅:</font><font color = red>$aSoft->daydowntimes/$aSoft->downnum</font>"; echo "<br>\");\n";}$aSoft->close();function showallclass() { global $set; $aCategory = new CCategory; $aClass = new CClass; $aCategory->open(); $aClass->open(); if(!$aCategory->moveFirst()) exit; for($i = 0; $i < $aCategory->getRecordCount(); $i ++) { $id = $aCategory->getAbsolutePosition(); echo "document.write(\"<img src=\'{$set[sysPath]}/{$set[tplRoot]}{$set[tplMode]}/images/quote.gif\'> <a href='{$set[sysPath]}/index.php?modules=list&categoryid=$id' title = $category_reserved><b>$aCategory->category_name</b></a>:\");"; $posList = $aClass->FilterByCategory($id); for($j = 0; $j < count($posList); $j ++) { $aClass->setAbsolutePosition($posList[$j]); echo "document.write(\"↑<a href='{$set[sysPath]}/index.php?modules=list&categoryid=$id&classid={$posList[$j]}' title = $aClass->reserved>$aClass->class_name</a>\");"; } print "document.write(\"<br>\");"; $aCategory->moveNext(); } $aCategory->close(); $aClass->close(); exit;}?>以上是一个PHP文件,显示库中的内容,看上去是输出javascript,但不知为什么就是没有显示,而且单独运行这个PHP文件时也没有内容显示。库中我已添加了内容 在js中的文件操作...求代码! javascript 图片翻页问题。 select onchange 问题 有一个三角形类Triangle 急哎 谢谢了 JS 图片切换 求教2个常见网页效果的实现 急:一个监听键盘按键的问题 IE bug,如何解决:select类型的表单域会透过下拉式菜单显示出来!!! 简单问题:网页间的框架如何传值? 现在大三,准备进入web开发这个行业,有些疑惑 如何修改父窗口的标题 大侠:可输入的下拉列表框怎么实现
那样怎么行,,
这种SRC只能引入javascript的文件
require "include/class_basic_record_file.php";
require "include/classes.php";//参数说明:$titlelen-标题长度;$action-显示动作;$category-文章大类;$type-文章小类;
// $author-是否显示作者;$date-是否显示日期;$read-是否阅读次数;
// $count-显示数量//默认值处理
if(empty($titlelen)) $titlelen = 20;
if(empty($count)) $count = 10;$aSoft = new CSoft;
$aSoft->open();if ($action == "hot") $posList = $aSoft->OrderByDownNum($category, $type); //热门文章
elseif($action == "comment") $posList = $aSoft->FilterByComment($category, $type, $count); //最新推荐
elseif($action == "new") $posList = $aSoft->FilterByClass($category, $type, "1", $count); //最新文章
elseif($action == "class") showallclass();if (empty($setid)) $setid = 0;for($i = 0; $i < min($count, count($posList)); $i++)
{
$id = $posList[$i + $setid];
$aSoft->setAbsolutePosition($id);
// 判断标题长度
$len = strlen($aSoft->name);
if ($len <= $titlelen) $name = $aSoft->name;
else
{
$name = substr($aSoft->name, 0, $titlelen);
$parity= 0;
for($j=0;$j<$titlelen;$j++)
{
$temp_str=substr($name,$j,1);
if(Ord($temp_str)>127) $parity+=1;
}
if($parity%2==1) $name=substr($name,0,($titlelen-1))."...";
else $name=substr($name,0,$titlelen)."...";
} // 取出分类名称
$aClass = new CClass;
$aClass->open();
$aClass->find($aSoft->class_id);
$type2 = $aClass->class_name;
$sort1id = $aClass->class_category_id;
$aClass->close(); $aCategory = new CCategory;
$aCategory->open();
$aCategory->find($sort1id);
$type1 = $aCategory->category_name; $datetmp = date($set[dateformat], $aSoft->updatetime); // 显示
echo "document.write(\"<img src='{$set[sysPath]}/{$set[tplRoot]}{$set[tplMode]}/images/rss.gif'><a href='{$set[sysPath]}/index.php?modules=list&categoryid={$aSoft->category_id}&classid=$aSoft->class_id'>[$type2]</a> <a href='{$set[sysPath]}/index.php?modules=show&id=$id' title='{$aSoft->name} - {$type1}|{$type2} {$datetmp} {$aSoft->viewnum}/{$aSoft->daydowntimes}' target=_blank>$name</a> ";
if($date == "yes") echo "<font color = #c0c0c0> $datetmp</font>";
if($author == "yes") echo "<font color = #c0c0c0> 文:$aSoft->empower</font>";
if($read == "yes") echo "<font color = #c0c0c0> 阅:</font><font color = red>$aSoft->daydowntimes/$aSoft->downnum</font>";
echo "<br>\");\n";
}
$aSoft->close();function showallclass()
{
global $set;
$aCategory = new CCategory;
$aClass = new CClass;
$aCategory->open();
$aClass->open();
if(!$aCategory->moveFirst()) exit;
for($i = 0; $i < $aCategory->getRecordCount(); $i ++)
{
$id = $aCategory->getAbsolutePosition();
echo "document.write(\"<img src=\'{$set[sysPath]}/{$set[tplRoot]}{$set[tplMode]}/images/quote.gif\'> <a href='{$set[sysPath]}/index.php?modules=list&categoryid=$id' title = $category_reserved><b>$aCategory->category_name</b></a>:\");";
$posList = $aClass->FilterByCategory($id);
for($j = 0; $j < count($posList); $j ++)
{
$aClass->setAbsolutePosition($posList[$j]);
echo "document.write(\"↑<a href='{$set[sysPath]}/index.php?modules=list&categoryid=$id&classid={$posList[$j]}' title = $aClass->reserved>$aClass->class_name</a>\");";
}
print "document.write(\"<br>\");";
$aCategory->moveNext();
}
$aCategory->close();
$aClass->close();
exit;
}?>以上是一个PHP文件,显示库中的内容,看上去是输出javascript,但不知为什么就是没有显示,而且单独运行这个PHP文件时也没有内容显示。库中我已添加了内容