人人人妻人人人妻人人人,99精品国产综合久久久久五月天 ,欧美白人最猛性XXXXX,日韩AV无码免费播放

News新聞

業(yè)界新聞動態(tài)、技術(shù)前沿
Who are we?

您的位置:首頁      樂道系統(tǒng)FAQ      php file_get_contents取文件中數(shù)組元素的方法

php file_get_contents取文件中數(shù)組元素的方法

標(biāo)簽: 發(fā)布日期:2017-04-01 00:00:00 246

用file_get_contents()抓取了 這個網(wǎng)址上的內(nèi)容

http://simonfenci.sinaapp.com/index.php?key=simon&wd=1314abc

看似好像反回的是數(shù)組。。但是我不管怎么用foreach循環(huán)都報錯。。

我只想把數(shù)組中的word里面的值 取出來。

方法如下:正解(其他的字段一樣,把word替換即可)

$s=file_get_contents('http://simonfenci.sinaapp.com/index.php?key=simon&wd=1314abc');$rule='#(?<=\[word\] =>)\s\w+#';preg_match_all($rule,$s,$arr);print_r($arr);