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 `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日
随机文章
Word文档如何排版才好看(SEO必备技能之word排版技巧)
一个网站能卖多少钱(SEO站长卖站变现)
如何选择虚拟主机空间(如何选择云服务器)
怎么加入百度知道合伙人(百度问答管理平台详解)
承德SEO培训教程(相对路径和绝对路径的区别有哪些)
湖南seo培训(百度搜索结果中APP调起问题的建议)
百度百家号怎么赚钱(百度百家1万浏览多少钱)
网站快速收录技术(如何让百度快速收录网站及文章)
本文《WordPress自动发布文章(insert into自动生成文章)》由小小课堂网整理或原创,侵删,欢迎转载并保留版权:https://xxkt.org.cn/ 感谢您的阅读。
本站提供SEO培训、咨询、诊断,QQ:2216876660 微信:huowuyan 公众号:小小课堂网
标签:SEO应用编程,SEO编程应用,SQL insert into,WordPress,WordPress自动发布文章