php Caricare WP dentro pagina HTML evitando errore 404
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Caricare WP dentro pagina HTML evitando errore 404相关的知识,希望对你有一定的参考价值。
//Invece di usare
require_once("diary/wp-blog-header.php");
//usare:
require_once("diary/wp-config.php");
$wp->init(); $wp->parse_request(); $wp->query_posts();
$wp->register_globals(); $wp->send_headers();
/*
From the documentation:
init() — set up the current user.
parse_request() — Parse request to find correct WordPress query.
query_posts() — Set up the Loop based on the query variables.
register_globals() — Set up the WordPress Globals.
send_headers() — Sets the X-Pingback header, 404 status (if 404), Content-type. If showing a feed, it will also send last-modified, etag, and 304 status if needed.
And obviously, we’re leaving out handle_404().
handle_404() — Issue a 404 if a request doesn’t match any posts and doesn’t match any object (e.g. an existing-but-empty category, tag, author) and a 404 was not already issued, and if the request was not a search or the homepage. Otherwise, issue a 200.
Now, our pages work as expected.
*/
以上是关于php Caricare WP dentro pagina HTML evitando errore 404的主要内容,如果未能解决你的问题,请参考以下文章