[英]PHP not executing in .INC file
不太确定'php'是否与它有关。 请查看http://iamwhitebox.com/staging/arkitek/#press
我的页面上有一个默认选项卡,显示按日期排序的 2 篇博客文章。 但是当我在菜单中单击返回时它不会显示,我将它包含在两个不同的地方,有没有更简单的方法来实现这一点? 我知道有
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('/home/whiteb0x/iamwhitebox.com/staging/arkitek/blog/wp-blog-header.php');
query_posts('cat=3&showposts=2');
?>
<article class="blog-feed">
<?php while (have_posts()): the_post(); ?>
<!-- begin post -->
<div class="blog-title">
<div class="blog-date">
<?php the_time('m.j.Y'); ?>
</div>
<strong><a class="blog-link" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>">
<?php the_title(); ?>
</a></strong>
</div>
<a class="blog-link" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>">
<div class="blog-thumbnail"><?php the_post_thumbnail( array(80,80) ); ?></div><?php the_content(); ?>
</a>
<div class="clearfix"></div>
<?php endwhile; ?>
</article>
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('/home/whiteb0x/iamwhitebox.com/staging/arkitek/blog/wp-blog-header.php');
query_posts('cat=3&showposts=2');
?>
<!DOCTYPE html>
<html>
<head></head>
<body>
<ul>
<li id="current_news">
<?php
echo "HELLO";
?>
**<?php
require('post.inc')
?>**
post.inc
是否以<?php
?
如果您希望您的代码在您包含时执行,那么您的包含文件具有这一点很重要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.