我在wordpress文件夹外创建php文件来编辑wordpress帖子,使用此代码时出错。
wp\\U update\\u发布
<?php include \'/go1/wp-includes/post.php\';?>
<?php
// Update post 1 hello word
$my_post = array(
\'ID\' => 1,
\'post_title\' => \'This is the updated post title.\',
\'post_content\' => \'This is the updated content.\',
);
// Update the post into the database
wp_update_post( $my_post );
?>
我的错误是:注意:使用未定义的常量ARRAY\\u A-在D:\\AAApc\\training\\XAMPP\\htdocs\\go1\\wp includes\\post中假定为“ARRAY\\u A”。php在线3628
致命错误:调用D:\\AAApc\\training\\XAMPP\\htdocs\\go1\\wp includes\\post中未定义的函数wp\\u cache\\u get()。php在线664