Is anything wrong with my code here?
This question already has an answer here:
The problem is that you have specified the assignment instead of comparison in the following line:
if ($post_title=='' || $post_keywords=='' || $post_content='' || $post_author=='' || $post_summary==''){
Change $post_content=''
to $post_content == ''
你的错误在这里$post_content=''
如果条件应该是$post_content==''
在这种情况下,你设置这个var $ post_content为空字符串,所以它将在数据库表中为空。
上一篇: 未捕获的错误:不能使用WP类型的对象
下一篇: 我的代码在这里有什么问题吗?