WordPress自动发布文章(insert into自动生成文章)

- 作者:小小课堂网 - 阅 699   推荐

WordPress自动发布文章教程。在WordPress中增加一个php文件,每次访问这个文件,可以产生并发布一篇新文章。今天,小小课堂网(xxkt.org.cn)分享的内容为《WordPress自动发布文章(SQL insert into自动生成文章)》。希望对大家有所帮助。

一、SQL insert into语句

INSERT INTO 语句用于向表格中插入新的行。用法如下:

INSERT INTO 表名称 VALUES (值1, 值2,….)

或者

INSERT INTO table_name (列1, 列2,…) VALUES (值1, 值2,….)

二、WordPress实例

如果不使用WordPress原有的页面来发布内容,就直接采用像WordPress的SQL中直接添加数据。

SQL insert into

$sql = “INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (NULL, ‘1’, ‘{$post_date}’, ‘{$post_date_gmt}’, ‘{$content}’, ‘{$title}’, ”, ‘draft’, ‘open’, ‘open’, ”, ”, ”, ”, ‘{$post_date}’, ‘{$post_date_gmt}’, ”, ‘0’, ‘foo’, ‘0’, ‘post’, ”, ‘0’);”;

以上就是小小课堂网(xxkt.org.cn)分享的内容为《WordPress自动发布文章(SQL insert into自动生成文章)》。感谢您的阅读。

本文最后一次更新时间:2022年2月28日

本文《WordPress自动发布文章(insert into自动生成文章)》由小小课堂网整理或原创,侵删,欢迎转载并保留版权:https://xxkt.org.cn/ 感谢您的阅读。

本站提供SEO培训、咨询、诊断,QQ:2216876660 微信:huowuyan 公众号:小小课堂网

标签:

相关文章!
error: Content is protected !!