在Web使用文件.php中显示图像

时间:2016-02-23 14:13:59

标签: php android

我是一名新手Android程序员,我不擅长网站设计。但是,我有一个项目从android发送到网站的图像,当我使用这个脚本时,图像从android发送到网站确定

    private bool SetMainRingList(StructureFeature strct, StructureFeature root, List<StructureFeature> mainRing) {
        if ((strct.Equals(root) && mainRing.Contains(strct))) {
            return false;
        }
        var children = strct.GetConnectedStructures();
        if ((children.Contains(root) && mainRing.Contains(strct))) {
            return false;
        }
        mainRing.Add(strct);
        foreach (var structureFeature in children) {
            if (mainRing.Contains(structureFeature)) {
                var strcture = mainRing.Find(x => x.Oid == structureFeature.Oid);
                if (strcture.ParentFeature == null)
                    continue;
                if (strcture.ParentFeature.Equals(root)) {
                    bool skip = false;
                    var crntChildren = strcture.GetConnectedStructures();
                    foreach (var childContainerse in crntChildren) {
                        if (!mainRing.Contains(childContainerse)) {
                            skip = true;
                            break;
                        }
                    }
                    if (!skip)
                        return false;
                }
                continue;
            }
            structureFeature.ParentFeature = strct;
            var leaf = SetMainRingList(structureFeature, root, mainRing);
            var exchangeSite = structureFeature as ExchangeStructure;
            if (leaf && ReferenceEquals(exchangeSite, null)) {
                mainRing.Remove(structureFeature);
            } else {
                return false;
            }
        }
        return true;
    }

我的照片位于here

但是现在我想在网页中显示图片(在我的网站nns12151069.esy.es中),我应该在脚本中写多少.php

1 个答案:

答案 0 :(得分:0)

请使用php http://www.w3schools.com/php/php_file_upload.asp

查找文件上传

另一方面,您可以直接从上传的路径中调用您的图像