易截截图软件、单文件、免安装、纯绿色、仅160KB

php表格输出

<?
//新闻类别
$query_cat="select * from $dbtable1";
$result_cat=mysql_query($query_cat) or die("<mce:script type="text/javascript"><!--
alert('提示:查寻新闻类别失败,请跟管理员联系')
// --></mce:script>");
if(!$result_cat)
{
echo "没有类别";
}
else
{
while($row_cat=mysql_fetch_array($result_cat))
{
echo "<table width='100%' border='0' cellspacing='1' cellpadding='1' bgcolor=#000000>";
echo "<tr>";
echo "<td bgcolor=#F1DAB1>";
echo" == $row_cat[title] ==</td></tr>";
echo "<tr><td bgcolor=#fef7ed>";
//本类别新闻标题
$query_news="select id,title,addtime from $dbtable2 where cateid='$row_cat[id]' order by addtime desc";
$result_news=mysql_query($query_news) or die("<mce:script type="text/javascript"><!--
alert('提示:查寻新闻标题失败,请跟管理员联系')
// --></mce:script>");
if ($result_news)
{
echo "<ul>";
while ($row_news=mysql_fetch_array($result_news))
{
echo "<li><a targer='_self' href="\" mce_href="\""shownews.php?id=$row_news[id]\">$row_news[title](".DateTime("Y-m-d "."H:i",$row_news['addtime']).")</a>";
}
echo"</ul>";
echo"<p align=right>";
echo"<a target='_self' href="\" mce_href="\""category.php?cate=$row_cat[id]\">更多新闻..</a></p>";


相关文档:

搜索引擎技术核心揭密(PHP版)

     谈到网页搜索引擎时,大多数人都会想到雅虎。的确,雅虎开创了一个互联网络的搜索时代。然而,雅虎目前用于搜索网页的技术却并非该公司原先自己开发的。2000年8月,雅虎采用了Google(www.google.com)这家由斯坦福大学学生创建的风险公司的技术。理由非常简单,Google的搜索引擎比雅虎先前使用的 ......

php4 xml解析类


一、用法举例:
1、将XML文件解释成便于使用的数组:
<?php
include('xml.php'); //引用PHP XML操作类
$xml = file_get_contents('data.xml'); //读取XML文件
//$xml = file_get_contents("php://input"); //读取POST过来的输入流
$data=XML_unserialize($xml);
echo '<pre>'; ......

PHP MKTIME

突然想起了在一次面试的时候要我写出未来一天是星期几,当时没有给写出来。现在想想还是觉得对date和mktime的概念很模糊,在这里记录下以备后用:程序如下
<?php
echo date( "l dS 0f F Y h:i:s A" );
echo "<br>";
print("July 1, 2010 is on a " . date("l", mktime(0,0,0,7,11,2010)));
?>
输出结果 ......

php页面间传值

例如:
A.php
<?php
$usernane
?>
要将A.php重的$usernane值传给另外一个页面(B.php)中的实现方法:
<meta   http-equiv='refresh'   content='0;url='B.php?user=$username'>   
  接收   
  echo   $_GET['user'];
这样,就可以在B.php中访问$use ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号