>  기사  >  웹 프론트엔드  >  Exitjs는 DataView_extjs에서 이미지 파일 이름을 가져옵니다.

Exitjs는 DataView_extjs에서 이미지 파일 이름을 가져옵니다.

WBOY
WBOY원래의
2016-05-16 18:41:001156검색

1、前台

复system代码 代码如下:



2、后台
复主代码 代码如下:

protected void Page_Load(객체 전송자, EventArgs e)
{
string path = Server.MapPath("images/thumbs");
string[] 파일 = System.IO.Directory.GetFiles(경로);
목록 data = new List(files.Length);
foreach(파일의 문자열 fileName)
{
System.IO.FileInfo fi = new System.IO.FileInfo(fileName);
data.Add(new { name = fi.Name,
url = "images/thumbs/" fi.Name,
size = fi.Length,
lastmod = fi.LastAccessTime });
}
this.Store1.DataSource = 데이터;
this.Store1.DataBind();
}
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.