我有一个php文件,要循环一个数组构造一个url数组。
$keywords = keyword_split($res['keywords']);$path='../ajax/search.php?key=';foreach($keywords as $k){ $filename = $path.$k; $content = 这里怎么调用这个php文件并返回内容???; var_dump($content);}$content = file_get_contents($filename);试试
$content = file_get_contents($filename);试试 这个不行。file_get_content不支持带参url
$content = file_get_contents($filename);试试 这个不行。file_get_content不支持带参url
我想了下 带参数的话得带上http协议 http://.................
直接用本地的php文件并且带参数 我还没想到办法.
$content = file_get_contents($filename);试试 这个不行。file_get_content不支持带参url
我想了下 带参数的话得带上http协议 http://.................
直接用本地的php文件并且带参数 我还没想到办法. 还是在页面里写个js用ajax调用吧,还没想到好办法
你的方法加上http走服务器一下就可以了吧
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号