I have a URL like this:
http://x.x.x.x/feedsms?to=$groupName&text=$content"
当我调用这个URL时,它应该发送一条短信。我使用
file_get_contents()
读取短信内容,并使用urlencode()
处理空格和特殊字符。$url = urlencode("http://x.x.x.x/feedsms?to=$groupName&text=$content");
$urlContent = file_get_contents($url);
$content
是这样的:
F: user@domain.com S: Veeam Repoting B: Target: y.y.y.y, Status: Error, Time: 8/22/2015 3:05:30 PM
但我无法调用该URL:
file_get_contents(): failed to open stream: No such file or directory ...
我尝试使用rawurlencode()
进行转码,但没有任何改变。