Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/265.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#unity www.text有错误文本,但不在www.error中_C#_Unity3d - Fatal编程技术网

c#unity www.text有错误文本,但不在www.error中

c#unity www.text有错误文本,但不在www.error中,c#,unity3d,C#,Unity3d,当我在Unity3D(c#)中使用WWW时,我发现结果很荒谬 www.text有错误文本,但不在www.error中。所以我无法检查是否发生了错误 if(!string.IsNullOrEmpty (www.error)) { //handling error //but www.error is null }else{ //print www.text

当我在Unity3D(c#)中使用WWW时,我发现结果很荒谬

www.text有错误文本,但不在www.error中。所以我无法检查是否发生了错误

            if(!string.IsNullOrEmpty (www.error)) {
                //handling error
                //but www.error is null
            }else{
                //print www.text
                Debug.Log(www.text);
            }
[打印控制台]

            <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
            <html><head>
            <title>503 Service Temporarily Unavailable</title>
            </head><body>
            <h1>Service Temporarily Unavailable</h1>
            <p>The server is temporarily unable to service your
            request due to maintenance downtime or capacity
            problems. Please try again later.</p>
            <p>Additionally, a 404 Not Found
            error was encountered while trying to use an ErrorDocument to handle the request.</p>
            </body></html>

503服务暂时不可用
服务暂时不可用
服务器暂时无法为您的服务
由于维护停机时间或容量而提出的请求
问题。请稍后再试

此外,未找到404 尝试使用ErrorDocument处理请求时遇到错误


有人有过这种经历吗?请帮帮我。

我看你的
支票是空的。没有看到任何空白,只有空字符串或
null

检查服务器返回的HTTP代码。在HTML中声明这是错误代码并不一定意味着协议错误是相同的。某些代理或损坏的设置可能导致此问题

获取并检查错误代码:

curl -v http://example.com/lipsum
并寻找:

< HTTP/1.1 404 Not Found
未找到HTTP/1.1 404

或者类似。

如果(!string.IsNullOrEmpty(www.error))显然www.error不是null,则在第行插入断点。可能它只包含空格