ThinkPHP调用织梦dedecms文章代码
php代码$PS=M("Archives","表前缀","mysql://用户名:密码@localhost:3306/表名");<br>
$where['typeid']=8;//取栏目id=8的数据 <br>
$NewPS=$PS->where($where)->order('pubdate desc')->limit(8)->select();<br>
$this->assign("NewPS",$NewPS);
模板代码//说明 链接写绝对的,日期直接调用,最后是文章id号,就完事了,必须调用指定的栏目,必须是二级,顶级下包含了下级是不行的,因为你生成的二级目录名字不一样,调用全站只能全站文章用动态,否则只能单个栏目调用<br>
<volist><br>
<li>
<a>{:msubstr($vo['title'],0,18)}...</a><br>
<font>{$vo.pubdate|date='m-d',###}</font><br>
</li>
<br>
</volist>
效果图下
地址: http://www.qq839.com/ 首页PS大学板块
更多交流+Q839024615
AD:真正免费,域名+虚机+企业邮箱=0元

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1
Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
