相关疑难解决方法(0)

@在PHP中意味着什么?

可能重复:
参考 - 这个符号在PHP中意味着什么?

我想知道@PHP语言是什么意思.我见过有人在用

$connect = @mysql_query('sql query here');
Run Code Online (Sandbox Code Playgroud)

不知道为什么.有人可以帮我解释一下吗?

php

63
推荐指数
2
解决办法
2万
查看次数

file_get_contents抛出400 Bad Request错误PHP

我只是用a file_get_contents()来获取像这样的用户的最新推文:

$tweet = json_decode(file_get_contents('http://api.twitter.com/1/statuses/user_timeline/User.json'));
Run Code Online (Sandbox Code Playgroud)

这在我的localhost上工作正常但是当我将它上传到我的服务器时它会抛出此错误:

警告: file_get_contents(http://api.twitter.com/1/statuses/user_timeline/User.json)[function.file-get-contents]:无法打开流:HTTP请求失败!HTTP/1.0 400错误请求...

不确定是什么导致它,也许我需要在我的服务器上设置php配置?

提前致谢!

php json file-get-contents

26
推荐指数
2
解决办法
4万
查看次数

标签 统计

php ×2

file-get-contents ×1

json ×1