资源简介
thinkphp3.2.3所写的仿京东商城,比较简化,带有数据库,可以学习很合适
代码片段和文件信息
#!/usr/bin/env python
import cgi
try:
import json
except ImportError:
import simplejson as json
import elFinder
# configure connector options
opts = {
#‘root‘: ‘/home/troex/Sites/git/elfinder/files‘
‘root‘: ‘../git/elfinder/files/‘
‘URL‘: ‘http://localhost:8001/~troex/git/elfinder/files‘
## other options
‘debug‘: True
‘fileURL‘: True # download files using connector no direct urls to files
# ‘dirSize‘: True
# ‘dotFiles‘: True
# ‘perms‘: {
# ‘backup‘: {
# ‘read‘: True
# ‘write‘: False
# ‘rm‘: False
# }
# ‘^/pics‘: {
# ‘read‘: True
# ‘write‘: False
# ‘rm‘: False
# }
# }
# ‘uploadDeny‘: [‘image‘ ‘application‘]
# ‘uploadAllow‘: [‘image/png‘ ‘image/jpeg‘]
# ‘uploadOrder‘: [‘deny‘ ‘allow‘]
# ‘disabled‘: [‘rename‘ ‘quicklook‘ ‘upload‘]
}
# init connector and pass options
elf = elFinder.connector(opts)
# fetch only needed GET/POST parameters
httpRequest = {}
form = cgi.FieldStorage()
for field in elf.httpAllowedParameters:
if field in form:
httpRequest[field] = form.getvalue(field)
if field == ‘upload[]‘:
upFiles = {}
cgiUploadFiles = form[‘upload[]‘]
for up in cgiUploadFiles:
if up.filename:
upFiles[up.filename] = up.file # pack dict(filename: filedescriptor)
httpRequest[‘upload[]‘] = upFiles
# run connector with parameters
status header response = elf.run(httpRequest)
# get connector output and print it out
# code below is tested with apache only (maybe other server need other method?)
if status == 200:
print ‘Status: 200‘
elif status == 403:
print ‘Status: 403‘
elif status == 404:
print ‘Status: 404‘
if len(header) >= 1:
for h v in header.iteritems():
print h + ‘: ‘ + v
print
if not response is None and status == 200:
# send file
if ‘file‘ in response and isinstance(response[‘file‘] file):
print response[‘file‘].read()
response[‘file‘].close()
# output json
else:
print json.dumps(response indent = True)
## logging
#import sys
#log = open(‘/home/troex/Sites/git/elfinder/files/out.log‘ ‘w‘)
#print >>log ‘FORM: ‘ form
#log.close()
## another aproach
## get connector output and print it out
#if elf.httpStatusCode == 200:
# print ‘HTTP/1.1 200 OK‘
#elif elf.httpStatusCode == 403:
# print ‘HTTP/1.x 403 Access Denied‘
#elif elf.httpStatusCode == 404:
# print ‘HTTP/1.x 404 Not Found‘
#
#if len(elf.httpHeader) >= 1:
# for header value in elf.httpHeader.iteritems():
# print header + ‘: ‘ + value
# print
#
#if not elf.httpResponse is None:
# if isinstance(elf.httpResponse[‘file‘] file):
# print elf.httpResponse[‘file‘].read()
# elf.httpResponse[‘file‘].close()
# else:
# print json.dumps(elf.httpResponse indent = True)
#
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-16 14:09 thinkPHP仿京东商城\
目录 0 2016-06-24 17:59 thinkPHP仿京东商城\数据库文件和安装说明\
文件 223410 2014-10-27 15:40 thinkPHP仿京东商城\数据库文件和安装说明\jd.sql
文件 211 2016-06-24 17:59 thinkPHP仿京东商城\数据库文件和安装说明\readme.txt
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\
文件 203 2014-10-10 16:31 thinkPHP仿京东商城\源代码\.htaccess
文件 1067 2016-06-24 17:12 thinkPHP仿京东商城\源代码\Admin.php
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\Common\
目录 0 2018-04-18 08:36 thinkPHP仿京东商城\源代码\Application\Admin\Common\Css\
目录 0 2018-04-18 08:36 thinkPHP仿京东商城\源代码\Application\Admin\Common\Images\
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\
文件 2286 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\admin_action.js
文件 897 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\admin_action_bbk.js
文件 4958 2014-10-12 23:38 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\admin_add.js
文件 3494 2014-10-12 23:38 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\admin_aedit.js
文件 3189 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\admin_edit.js
文件 1149 2014-10-12 23:36 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\check_login.js
文件 1636 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\index_action.js
文件 8827 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\md5.js
文件 1338 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\news.js
文件 143 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\st
文件 266 2014-10-10 16:31 thinkPHP仿京东商城\源代码\Application\Admin\Common\Js\user.js
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\bootstrap\
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\bootstrap\css\
文件 36827 2014-10-10 16:30 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\bootstrap\css\bootstrap.css
文件 31268 2014-10-10 16:30 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\bootstrap\css\bootstrap.min.css
目录 0 2016-06-24 18:00 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\bootstrap\js\
文件 19176 2014-10-10 16:30 thinkPHP仿京东商城\源代码\Application\Admin\Common\Template\bootstrap\js\bootstrap.js
............此处省略4327个文件信息
相关资源
- 基于thinkphp5的健身房管理信息系统
- php多商户商城系统
- 61-基于thinkphp框架开发的办公oa管理系
- 基于php的选课系统 ThinkPHP+MySQL
- php+thinkphp+mysql开发的erp系统
- thinkphp5集成HUI后台管理系统
- thinkphp工单系统
- zw_Thinkphp小型商城的源码.zip
- thinkphp3.2整合国外Charisma Admin Template后
- ThinkPHP商城系统源码仿京东
- Thinkphp 5.1框架B2B2C商城系统,多用户商
- thinkphp仪器仪表管理系统
- thinkPHP仿某商场网站源码
- 自己写的Thinkphp小型商城的源码包含各
- 四方支付源码
- thinkphp使用mpdf导出html为pdf文件
- ThinkPHP5多小区物业管理系统源码系统
- php商城代码源码
- element+thinkphp5+vue
- 基于THINKPHP内核二次开发版在线视频教
- 基于ThinkPHP 微名片独立系统源码
- Ecmos(ecmall深度定制的商城购物系统)
- DSMALL商城源码Thinkphp源码B2B2C商城源码
- 2018年thinkphp最新直播完整源码
- 霸屏天下传媒系统开源源码.rar
- thinkphp答题小程序源码
- 2019新ecshop小米商城php源码+购物网站模
- thinkphp5仿网易音乐的网
- ecshop源代码+茶叶商城模板+后台+微信
- 来客推小程序分销商城源码 v2.3
评论
共有 条评论