仿知美网的,要实现
在u_menu.htm ,打印$home_user,输出下面结果
array(64) { ["uid"]=> string(1) "1" ["gid"]=> string(1) "7" ["email"]=> string(17) "1006440989@qq.com" ["user_name"]=> string(11) "wangtongphp" ["password"]=> string(32) "f59b6e100715665f4398c62b48466d0e" ["money"]=> string(4) "0.00" ["credits"]=> string(2) "44" ["reg_time"]=> string(10) "1367603232" ["status"]=> string(1) "1" ["email_status"]=> string(1) "0" ["avatar"]=> string(1) "0" ["is_daren"]=> string(1) "0" ["ucenter_id"]=> string(1) "0" ["invite_id"]=> string(1) "0" ["is_buyer"]=> string(1) "0" ["buyer_level"]=> string(1) "0" ["seller_level"]=> string(1) "0" ["server_code"]=> string(0) "" ["active_sn"]=> string(0) "" ["follows"]=> string(1) "0" ["fans"]=> string(1) "0" ["collects"]=> string(1) "0" ["favs"]=> string(1) "0" ["threads"]=> string(1) "1" ["photos"]=> string(1) "3" ["goods"]=> string(1) "1" ["shares"]=> string(1) "5" ["forums"]=> string(1) "1" ["forum_posts"]=> string(1) "0" ["albums"]=> string(1) "0" ["referrals"]=> string(1) "0" ["looks"]=> string(1) "0" ["dapei"]=> string(1) "0" ["groups"]=> string(1) "1" ["events"]=> string(1) "0" ["activity"]=> string(1) "1" ["activity_post"]=> string(1) "0" ["vote"]=> string(1) "0" ["vote_post"]=> string(1) "0" ["trial"]=> string(1) "0" ["trial_post"]=> string(1) "0" ["reg_ip"]=> string(9) "127.0.0.1" ["last_ip"]=> string(9) "127.0.0.1" ["last_time"]=> string(10) "1367603232" ["last_activity"]=> string(10) "1367603232" ["active_hash"]=> string(0) "" ["reset_hash"]=> string(0) "" ["edit_name_count"]=> string(1) "0" ["black_users"]=> NULL ["medals"]=> string(1) "1" ["last_share"]=> string(2) "11" ["nick_name"]=> string(0) "" ["gender"]=> string(1) "0" ["birth_year"]=> string(1) "0" ["birth_month"]=> string(1) "0" ["birth_day"]=> string(1) "0" ["reside_province"]=> string(1) "1" ["reside_city"]=> string(2) "36" ["school"]=> string(0) "" ["workplace"]=> string(0) "" ["occupation"]=> string(1) "0" ["weibo"]=> string(31) "http://wangtongphp.cnblogs.com/" ["hobby"]=> string(0) "" ["introduce"]=> string(21) "我是一只小小鸟" }
一一对应就是
分享{$home_user['shares']}
小组{$home_user['groups']}
想买{$home_user['favs']}
买过{$home_user['goods']}
收纳盒{$home_user['albums']}
信件{$home_user['']}
主题{$home_user['threads']}
活动{$home_user['activity']}
小组{$home_user['groups']}
想买{$home_user['favs']}
买过{$home_user['goods']}
收纳盒{$home_user['albums']}
信件{$home_user['']}
主题{$home_user['threads']}
活动{$home_user['activity']}
动态<?php $wt_count = $home_user['shares'] + $home_user['goods'] + $home_user['looks'] + $home_user['dapei']; echo $wt_count;?>
结果是
在这里还发现了方维3.0的一个bug,喜欢数总是为0,查了一下fanwe_user_count这个表才知道,喜欢的时候数值根本没有被修改