
方法一,直接使用php打开需要获取商品顶级分类的php文件代码如下:$cat_arr=get_parent_cats($goods['cat_id']);foreach($cat_arrAS$val){$goods['topcat_id']=$val['cat_id'];$goods['topcat_name']=$val['cat_name'];}方法二,修改成模板标签形式打开goods.php文件,找到代码如下:$smarty->assign('goods',$goods);在它上面增加下面代码代码如下:$cat_arr=get_parent_cats($goods['cat_id']);foreach($cat_arrAS$val){$good...

CloudplatformHerokutodayannouncedasetofnewtoolsforPHPdevelopersthataimtogivePHPthekindofenterprise-gradesupportthecompanyalreadyoffersforRails,Python,node.jsandotherlanguages.It’snosecretthatPHPdoesn’talwaysgetthecredititdeserves.Whilethelanguagehasdevelopedquiteabitoverthelastfewyears—inlargepartthankstocapableframeworksandpackagesupportwithComposer–itstill...