dongxin1999 2013-08-12 09:54
浏览 55

使用PHP自动添加新的帖子链接

I'm certain I can use PHP to accomplish this task, but I'm not sure how. What I currently have is a faux news (ha ha ho ho) site for practise here.

http://puu.sh/402Rl.png
For Browse News, I would like all html documents within a specified folder to be shown in the format I have

SAMPLE

<p class="content centeralign">
8.12.13 <!-- ARTICLE NAME -->
</p>
<hr noshade></hr>

Although it's not much, setting up a way to do this automatically would save some time.

Here is how I would imagine the logistics behind this would function ----

All HTML files will be listed in a folder

They will all have a consecutive order based on the date they were created (e.g. 1.html, 2.html, 3.html etc.

PHP would find each document and add it in the right order

A bit inside the file would define the title (meta tags?)

  • 写回答

3条回答 默认 最新

  • dongwen9947 2013-08-12 09:58
    关注

    That seems a really bad way of doing it, but anyway.. You want to be you want to be using the directory functions. Specifically http://www.php.net/manual/en/function.readdir.php

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度