function.posts.php

来自「一个用PHP编写的」· PHP 代码 · 共 14 行

PHP
14
字号
<?php	function smarty_function_posts($params, &$smarty)	{    	// we can do this since we loaded this value from within        // the action    	$articles = $smarty->get_template_vars("articles");        // go through all the posts        foreach( $articles as $article ) {			$smarty->assign( "post", $article );            $smarty->display( "default/post.template" );        }	}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?