echo 限制 eclipse php 吗?这是内存不足的问题吗?

发布于 2024-10-26 01:34:13 字数 1005 浏览 2 评论 0原文

所以我设法创建了一些可爱的 php 代码,在 Eclipse 上使用 file_get_contents 来访问 bing、yahoo 和 google。现在,为了查看我检索到的内容(每个搜索引擎 5 个结果),我创建了一个双重嵌套 for 循环,以可读形式回显所有内容。

当我让 yahoo 和 google 显示他们各自的 5 个结果时,这个方法就起作用了。下面是根据搜索查询显示的内容的示例: 1) 标题:魔鬼下到佐治亚 - 维基百科,免费的百科全书 简介:《The Devil Went Down to Georgia》是一首由 Charlie Daniels Band 创作并演唱的歌曲,并在他们 1979 年[1] 的专辑《Million Mile Reflections》中发行。 ... http://en.wikipedia.org/wiki/The_Devil_Went_Down_to_Georgia

现在,当我这样做时,这不起作用让所有三个搜索引擎都显示其结果。因此,当我调试它时,程序在 Bing 回显其第三个结果(另外两个回显其 5)后停止。我尝试重新排列,但遇到了同样的问题。我什至将结果增加到 20,并且只有 yahoo 显示其结果,程序在第 14 个结果后停止。

现在我创建了其他东西来测试发生的情况,如下所示: while($a < 50){ echo $a。" 摘要:免费 mp3 下载、Million Mile Reflections [英国]、mp3、mp3、免费、mp3 下载、mp3 下载、免费 Mp3 下载、mp3 音乐下载、音乐搜索、mp3 搜索、mp3 音乐\n"; $a++; 当我通过这个重复的 echo代码

进行调试时,它在第 20 行之后卡住了。我不知道为什么。我可以回应的内容有限制吗?难道是我失忆了?如果是这样,那么我该如何解决呢?我有 512MB 的 RAM,还有大约 20GB 的剩余硬盘空间。我尝试在 Eclipse 中四处查看,但未能找到一些增加内存使用或清除缓存等的功能。

So i managed to create some lovely php code that uses file_get_contents for bing, yahoo, and google on Eclipse. Now to view the contents I retrieved (5 results per search engine), I created a double nested for loop to echo out everything in a readable form.

This worked when I had just yahoo and google displaying their respective 5 results. An example would be below on what would display based on the search query:
1) Title: The Devil Went Down to Georgia - Wikipedia, the free encyclopedia
Summary: "The Devil Went Down to Georgia" is a song written and performed by the Charlie Daniels Band and released on their 1979[1] album Million Mile Reflections. ...
http://en.wikipedia.org/wiki/The_Devil_Went_Down_to_Georgia

Now this didn't work when I had all three search engines to display their results. So when I debugged through it, the program halted after Bing echoed its third result (the other two echoed their 5). I tried rearranging and I get the same issues. I even had it where I increased the results to 20 and had only yahoo display its results which the program stopped after the 14th result.

Now I created something else to test what is going on shown below:
while($a < 50){
echo $a." Summary: free mp3 download, Million Mile Reflections [UK], mp3, mp3s, free, mp3 download, mp3 dowload, free Mp3 downloads, mp3 music download, music search, mp3 search,mp3 music\n";
$a++;
}

When I debugged through this repeating echo code, it became stuck after line 20. I am not sure why. Is there a limit to what I can echo? Am I out of memory? If so, then how do I resolve it? I have 512MB of RAM and have about 20GB of HD space remaining. I tried looking around in Eclipse and I am failing to find some functionality to increase memory usage or clearing a cache or whatever.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文