Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/289.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# Xamarin android在php web宿主的ImageView中设置图像_C#_Php_Android_Xamarin - Fatal编程技术网

C# Xamarin android在php web宿主的ImageView中设置图像

C# Xamarin android在php web宿主的ImageView中设置图像,c#,php,android,xamarin,C#,Php,Android,Xamarin,只要我在我的c#Xamarin android代码中添加一个图像url var imageBitmap = GetImageBitmapFromUrl(mydata["newsimage1"].ToString()); imageView1.SetImageBitmap(imageBitmap); 从blogger这样的网站上,它可以正常工作,应用程序可以毫无问题地查看它 例如,此图像url: 它工作得很好,但当我把一个上传到我的php网络主机的图像 它不起作用 例如,此url: www.i

只要我在我的c#Xamarin android代码中添加一个图像url

var imageBitmap = GetImageBitmapFromUrl(mydata["newsimage1"].ToString());
imageView1.SetImageBitmap(imageBitmap);
从blogger这样的网站上,它可以正常工作,应用程序可以毫无问题地查看它

例如,此图像url:

它工作得很好,但当我把一个上传到我的php网络主机的图像 它不起作用

例如,此url:

www.ihled.eb2a.com/gcmt/newsmimages/170108022726.jpg


有人知道吗

您需要查看这两种情况下的详细http响应,并查看它们的不同之处。您的本地主机可能没有设置正确的内容标题,或者类似的内容。它正确响应图像url我认为可能是因为图像目录权限之类的原因!有什么新想法吗?但我不知道如何解决这一问题?您是否在
www.ihled.eb2a.com/gcmt/NewsImages/170108022726.jpg
前面添加了
http://
?我尝试了两种http://-或不使用http://