文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>php blog (1)

php blog (1)

时间:2008-07-20  来源:wstczyl

本文 参考 利用 PHP 和 Subversion 从零开始创建一个 blog
https://www6.software.ibm.com/developerworks/cn/education/opensource/os-php-blog/index.html


Tyler Anderson
, 自由作者, Stexar Corp.
2006 年 4 月 20 日
需要创建的文件如下:

  • index.php
  • header-sidebar.php
  • footer.php
  • includes/functions.php
  • edit/index.php
  • edit/header.html
  • edit/footer.html
  • edit/includes/functions.php

代码: index.php
?php
include('includes/functions.php');
define('DIRECTORY_LISTING', "blogs");
$title="Welcome to ".BLOG_NAME;
include('header-sidebar.php');
if($_GET['blog'] != ''){
    printBlog($_GET['blog']);
}
else{
    print("
Welcome to ".BLOG_NAME."!
Take a look at my latest postings on the left.");
}
include('footer.php');
?>

header-sidebar.php

?php
print('
'.$title.'
');
displayTopBar();
print('
'.$title.'');
print('
  
    My Web Logs
  
  
    ');
listBlogs();
print('
   
  
');
// add new side panel items here, using the above "My Web Logs"
// item as a template.
print('
');
?>
footer.php

/td>/tr>
tr>td align="center" colspan="2">
font size="2px">br>
center>Copyright 2005, ?php print(BLOG_NAME) ?>/center>
/font>
/td>/tr>/table>
/body>/html>


相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载