niux 发表于 2016-7-21 11:42:11

如何用程序添加文章,我写的怎么没反应

[*] add($post)){echo 'ok';}
[*]
[*]
[*]?>复制代码

niux 发表于 2016-7-21 15:35:19

自己解决了,贴出来跟大家分享
[*]defined('IN_DESTOON') or exit('Access Denied');
[*]include_once DT_ROOT .'/module/article/article.class.php';
[*]//include_once DT_ROOT .'/module/article/common.inc.php';
[*]include_once DT_ROOT .'/include/post.func.php';
[*]$post = array();
[*]$post['catid']='25';
[*]$post['title']='测试';
[*]$post['username']='yinghao';
[*]$post['addtime']='2016-07-21 19:10:11';
[*]$post['status']='2';
[*]$post['content']='测试测试测试测试测试';
[*]echo '1';
[*]$table='xx_article_21';
[*]$table_data='xx_article_data_21';
[*]$do= new article("21");
[*]if ($do -> add($post)){echo 'ok';}复制代码

龙在天涯 发表于 2016-7-22 08:42:04

不错,学习一下
页: [1]
查看完整版本: 如何用程序添加文章,我写的怎么没反应