聯(lián)系官方銷售客服
1835022288
028-61286886
PHP程序里面
URL地址相對路徑:https://it0772.net/index.php
PHP文件相對路徑:D:\wwwroot\yufengly\wwwroot/dayrui/App/
使用任意API查詢接口,查詢搜索文章標(biāo)題關(guān)鍵字“歡歌螺韻 魅力魚峰”,然后返回一個json數(shù)據(jù),里面包含有文章數(shù)據(jù)
https://it0772.net/index.php?appid=2&appsecret=XXX&s=news&c=search&keyword=歡歌螺韻 魅力魚峰
這是現(xiàn)在查詢到的數(shù)據(jù),我要如何獲取里面的文章內(nèi)容
"id": "1069",
"catid": "155",
"title": "“歡歌螺韻 魅力魚峰”⒀:飛“閱”鄉(xiāng)村",
"thumb": null,
"keywords": null,
"description": "夢幻新安、水山秘境、金色龍江……魚峰區(qū)里雍。。。。",
"hits": "223",
"uid": "0",
"author": "cyberadmin",
"status": "9",
"url": "https://it0772.net/index.php?c=show&id=1069",
"link_id": "0",
"tableid": "0",
"inputip": "XXXXXXX",
"inputtime": "2020-09-29 11:37:59",
"updatetime": "2020-10-14 11:44:56",
"comments": "0",
"avgsort": "0.00",
"displayorder": "0",
"relateNews": null,
"media": "",
"newsform": "魚峰區(qū)委宣傳部",
"fabuzhe": "本站",
"thumbs": [
"4419"
],
"shzxx": null,
"fujian": [],
"zxts_total": "0",
"kfpl": "2",
"test_total": "0",
"wailian": "",
"_inputtime": "1601350679",
"_updatetime": "1602647096",
"_thumbs": "[\"4419\"]",
"_fujian": ""
},
插件版權(quán):官方插件
插件名稱:API接口
這個api是返回的主表數(shù)據(jù),文章內(nèi)容是附表,所以不會返回他,需要寫一個回調(diào)方法
參考文檔:《回調(diào)方法的定義》
打開或新建文件/dayrui/My/Library/Http.php,這個文件專門是定義回調(diào)方法的
請求的url后綴加一個
回復(fù)@官方插件實習(xí)技術(shù) 可是回調(diào)方法怎么得到附表的內(nèi)容?
回調(diào)方法里面我已經(jīng)寫好了,調(diào)用附表內(nèi)容
回復(fù)@1451599023
回復(fù)@官方插件實習(xí)技術(shù)
我沒改對嗎,提示系統(tǒng)故障了
把錯誤日志內(nèi)容發(fā)來看看,方法是:http://help.xunruicms.com/658.html
你需要把你完整的請求URL給我,我再給你改改URL的參數(shù)和回調(diào),【敏感key參數(shù)請?zhí)砑拥健皟H管理員可見區(qū)域”】
回復(fù)@官方插件實習(xí)技術(shù)
這個錯誤是cms版本低了,升級下cms
回復(fù)@1451599023
不好意思,回調(diào)函數(shù)我寫錯了
回復(fù)@官方插件實習(xí)技術(shù) 還是報錯
這個是cms版本低了,升級cms,我本地運行ok的
回復(fù)@1451599023
回復(fù)@官方插件實習(xí)技術(shù) 怎么刪除剛剛的回復(fù)的信息?
回調(diào)方法很舒服,想加什么字段就可以輸出什么字段