1,开发环境推荐使用 netbeans
2,输出页面错误 在index.php中添加
@error_reporting(E_ALL);
@ini_set('display_errors' , 'on');
@ini_set('display_startup_errors', TRUE);
@date_default_timezone_set('PRC');
@ini_set('max_execution_time' , '300');
//@ini_set('memory_limit' , '300');
3,错误,修改删除内容类型字段后 views没有进行修改产生错误
Fatal error: Cannot use string offset as an object in D:\wwwroot\bjdss8\wwwroot\sites\all\modules\views\includes\view.inc on line 484
解决办法 在此前面添加
if(!is_object( $this) || !is_object( $this->display['default'])){
return FALSE;
}
//推荐主题
theme_get_suggestions(explode('/', $_GET['q']), 'page');
系统设置
$show_breadcrumb_home = theme_get_setting('zen_breadcrumb_home');
加载分类术语
$term = taxonomy_term_load($req[2]);
var_dump($term) ;
$parents = taxonomy_get_parents($term->tid);
给当前用户添加5积分
//Add 5 points to the currently logged in user
userpoints_userpointsapi(5);
//Also add 5 points to the currently logged in user
$params = array (
'uid' => $user->uid,
'points' => 5,
);
userpoints_userpointsapi($params);