php error file_get_contents()

本文涉及的产品
全局流量管理 GTM,标准版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
云解析 DNS,旗舰版 1个月
简介: 国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址: http://jdb.jiudingcapital.com/phone.html
内部邀请码: C8E245J (不写邀请码,没有现金送)
国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

piwik 放在服务器跑时,出现如下错误:

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/apache2/htdocs/heshun/kkk/zz.php on line 99
Warning: file_get_contents(http://www.php.net): failed to open stream: Invalid argument in /usr/local/apache2/htdocs/heshun/kkk/zz.php on line 99
to my surprise, when I log into my local net(BSD OS, PHP 4.3.10 ) and I run it by following:

google 了一把,检查如下问题:

1、检查 php.ini 的配置 allow_url_fopen 是否为 on

2、检查 dns 错误,直接在 /etc/resolve.conf 添加 dns 服务器即可。

比如:

#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!

nameserver 10.30.1.9
nameserver 10.30.1.10

 

 

目录
相关文章
|
4月前
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
|
应用服务中间件 PHP nginx
PHP ERROR: Unable to create the PID file (/usr/var/run/php-fpm.pid).: No such file or directory (2)
PHP ERROR: Unable to create the PID file (/usr/var/run/php-fpm.pid).: No such file or directory (2)
260 1
|
JSON 前端开发 PHP
dataType:'json'时post,总是调用error???附带php和json的一些坑
ajax是一个不错的东西 当dataType:'json'时提交,总是返回error 这是为什么? 经过折腾,终于发现因为要求的是json,返回的信息并不是json格式,因此总是出错
74 0
|
应用服务中间件 PHP nginx
PHP ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2)
PHP ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2)
162 1
|
应用服务中间件 PHP nginx
php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock
php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock
405 0
|
PHP
php函数file_get_contents无法获取到https链接内容问题使用curl的解决方案
php函数file_get_contents无法获取到https链接内容问题使用curl的解决方案
165 0
|
JSON 前端开发 JavaScript
php函数file_get_contents应对百度天气接口CORB跨域解决方案
php函数file_get_contents应对百度天气接口CORB跨域解决方案
92 0
|
PHP 计算机视觉
百度人脸识别php版本数组数组简写导致的{"readyState":4,,"status":500,"statusText":"Internal Error"}错误
百度人脸识别php版本数组数组简写导致的{"readyState":4,,"status":500,"statusText":"Internal Error"}错误
79 0
Parse error: syntax error, unexpected '<<' (T_SL) in .../test2.php on line 2
Parse error: syntax error, unexpected '<<' (T_SL) in .../test2.php on line 2
178 0
|
缓存 PHP 开发工具
Composer 更新时报错:PHP Fatal error: composerRequireac6b4…(): Failed opening required ‘…/src/helpers.php
Composer 更新时报错:PHP Fatal error: composerRequireac6b4…(): Failed opening required ‘…/src/helpers.php
224 0
Composer 更新时报错:PHP Fatal error:  composerRequireac6b4…(): Failed opening required ‘…/src/helpers.php