作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在设置我的 ubuntu Web 服务器,并在其上设置防火墙。除了我的一个文件有 file_get_contents() 之外,一切都很好。我只是想知道我需要解锁哪个端 Eloquent 能使其正常工作。
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/site/videos.php on line 65
$xml = simplexml_load_string(file_get_contents('http://gdata.youtube.com/feeds/api/users/TomSka/uploads'));
最佳答案
要更改链接中详细说明的防火墙设置,它将起作用。请引用以下文件
http://www.radiotope.com/content/safari-and-sonicwall
设置是“使用 CFS 强制执行主机标记搜索”
奇怪的是,它似乎只影响在 Linux 其他平台上运行的 PHP 5 上的 fget,其他 PHP 生成的 HTTP 请求不受影响。
关于php - Ubuntu iptable 搞砸 file_get_contents(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17140225/
我是一名优秀的程序员,十分优秀!