Skip to content

tadink/article_php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

获取文章

$article=$db->getArticle($articleId);
echo $article["id"];
echo $article["title"];
echo $article["summary"];
echo $article["pic"];
echo $article["content"];
echo $article["author"];
echo $article["type_id"];
echo $article["type_name"];


获取文章列表

$articles=$db->getArticleList($limit = 20);

php代码块

<?php
    $a=1;
?>

php 条件判断

<?php if($a>1):?>
<?php elseif($a>2):?>
<?php else:?>
<?php endif ?>

php 循环

<?php foreach($articles as $k=>$article):?>
<?php endforeach?>
<?php for($i=0;$i<10;$i++):?>
<?php endfor?>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published