php让图片可以下载的代码第1/2页

2015-01-24信息快讯网
// 文件目录
define(‘DL_DIR', ‘temp/');
// 常见扩展名所对应的MIME类型
$MIMETypes = array(
‘ez' => ‘application/andrew-inset',
‘hqx' => ‘application/mac-binhex40′,
‘cpt' => ‘application/mac-compactpro',
‘doc' => ‘application/msword',
‘bin' => ‘application/octet-stream',
‘dms' => ‘application/octet-stream',
‘lha' => ‘application/octet-stream',
‘lzh' => ‘application/octet-stream',
‘exe' => ‘application/octet-stream',
‘class' => ‘application/octet-stream',
'so' => ‘application/octet-stream',
‘dll' => ‘application/octet-stream',
‘oda' => ‘application/oda',
‘pdf' => ‘application/pdf',
‘ai' => ‘application/postscrīpt',
‘eps' => ‘application/postscrīpt',
‘ps' => ‘application/postscrīpt',
'smi' => ‘application/smil',
'smil' => ‘application/smil',
‘mif' => ‘application/vnd.mif',
‘xls' => ‘application/vnd.ms-excel',
‘ppt' => ‘application/vnd.ms-powerpoint',
‘wbxml' => ‘application/vnd.wap.wbxml',
‘wmlc' => ‘application/vnd.wap.wmlc',
‘wmlsc' => ‘application/vnd.wap.wmlscrīptc',
‘bcpio' => ‘application/x-bcpio',
‘vcd' => ‘application/x-cdlink',
‘pgn' => ‘application/x-chess-pgn',
‘cpio' => ‘application/x-cpio',
‘csh' => ‘application/x-csh',
‘dcr' => ‘application/x-director',
‘dir' => ‘application/x-director',
‘dxr' => ‘application/x-director',
‘dvi' => ‘application/x-dvi',
'spl' => ‘application/x-futuresplash',
‘gtar' => ‘application/x-gtar',
‘hdf' => ‘application/x-hdf',
‘js' => ‘application/x-javascrīpt',
'skp' => ‘application/x-koan',
'skd' => ‘application/x-koan',
'skt' => ‘application/x-koan',
'skm' => ‘application/x-koan',
‘latex' => ‘application/x-latex',
‘nc' => ‘application/x-netcdf',
‘cdf' => ‘application/x-netcdf',
'sh' => ‘application/x-sh',
'shar' => ‘application/x-shar',
'swf' => ‘application/x-shockwave-flash',
'sit' => ‘application/x-stuffit',
'sv4cpio' => ‘application/x-sv4cpio',
'sv4crc' => ‘application/x-sv4crc',
‘tar' => ‘application/x-tar',
‘tcl' => ‘application/x-tcl',
‘tex' => ‘application/x-tex',
‘texinfo' => ‘application/x-texinfo',
‘texi' => ‘application/x-texinfo',
‘t' => ‘application/x-troff',
‘tr' => ‘application/x-troff',
‘roff' => ‘application/x-troff',
‘man' => ‘application/x-troff-man',
‘me' => ‘application/x-troff-me',
‘ms' => ‘application/x-troff-ms',
‘ustar' => ‘application/x-ustar',
'src' => ‘application/x-wais-source',
‘xhtml' => ‘application/xhtml+xml',
‘xht' => ‘application/xhtml+xml',
‘zip' => ‘application/zip',
‘au' => ‘audio/basic',
'snd' => ‘audio/basic',
‘mid' => ‘audio/midi',
‘midi' => ‘audio/midi',
‘kar' => ‘audio/midi',
‘mpga' => ‘audio/mpeg',
‘mp2′ => ‘audio/mpeg',
‘mp3′ => ‘audio/mpeg',
‘aif' => ‘audio/x-aiff',
‘aiff' => ‘audio/x-aiff',
‘aifc' => ‘audio/x-aiff',
‘m3u' => ‘audio/x-mpegurl',
‘ram' => ‘audio/x-pn-realaudio',
‘rm' => ‘audio/x-pn-realaudio',
‘rpm' => ‘audio/x-pn-realaudio-plugin',
‘ra' => ‘audio/x-realaudio',
‘wav' => ‘audio/x-wav',
‘pdb' => ‘chemical/x-pdb',
‘xyz' => ‘chemical/x-xyz',
‘bmp' => ‘image/bmp',
‘gif' => ‘image/gif',
‘ief' => ‘image/ief',
‘jpeg' => ‘image/jpeg',
‘jpg' => ‘image/jpeg',
‘jpe' => ‘image/jpeg',
‘png' => ‘image/png',
‘tiff' => ‘image/tiff',
‘tif' => ‘image/tiff',
‘djvu' => ‘image/vnd.djvu',
‘djv' => ‘image/vnd.djvu',
‘wbmp' => ‘image/vnd.wap.wbmp',
‘ras' => ‘image/x-cmu-raster',
‘pnm' => ‘image/x-portable-anymap',
‘pbm' => ‘image/x-portable-bitmap',
‘pgm' => ‘image/x-portable-graymap',
‘ppm' => ‘image/x-portable-pixmap',
‘rgb' => ‘image/x-rgb',
‘xbm' => ‘image/x-xbitmap',
‘xpm' => ‘image/x-xpixmap',
‘xwd' => ‘image/x-xwindowdump',
‘igs' => ‘model/iges',
‘iges' => ‘model/iges',
‘msh' => ‘model/mesh',
‘mesh' => ‘model/mesh',
'silo' => ‘model/mesh',
‘wrl' => ‘model/vrml',
‘vrml' => ‘model/vrml',
‘css' => ‘text/css',
‘html' => ‘text/html',
‘htm' => ‘text/html',
‘asc' => ‘text/plain',
‘txt' => ‘text/plain',
‘rtx' => ‘text/richtext',
‘rtf' => ‘text/rtf',
'sgml' => ‘text/sgml',
'sgm' => ‘text/sgml',
‘tsv' => ‘text/tab-separated-values',
‘wml' => ‘text/vnd.wap.wml',
‘wmls' => ‘text/vnd.wap.wmlscrīpt',
‘etx' => ‘text/x-setext',
‘xsl' => ‘text/xml',
‘xml' => ‘text/xml',
‘mpeg' => ‘video/mpeg',
‘mpg' => ‘video/mpeg',
‘mpe' => ‘video/mpeg',
‘qt' => ‘video/quicktime',
‘mov' => ‘video/quicktime',
‘mxu' => ‘video/vnd.mpegurl',
‘avi' => ‘video/x-msvideo',
‘movie' => ‘video/x-sgi-movie',
‘ice' => ‘x-conference/x-cooltalk',
);
?> 
php中static静态变量的使用方法详解
php Static关键字实用方法
IIS下PHP连接数据库提示mysql undefined function mysql_connect()
Joomla下利用configuration.php存储简单数据
php UTF-8、Unicode和BOM问题
php select,radio和checkbox默认选择的实现方法
php radio 单选框获取与保持值的实现代码
PHP 开发环境配置(Zend Studio)
PHP iconv 解决utf-8和gb2312编码转换问题
用PHP获取Google AJAX Search API 数据的代码
PHP Memcached + APC + 文件缓存封装实现代码
php microtime获取浮点的时间戳
同台服务器使用缓存APC效率高于Memcached的演示代码
Apache环境下PHP利用HTTP缓存协议原理解析及应用分析
PHP 手机归属地查询 api
php中$this->含义分析
php self,$this,const,static,->的使用
PHP nl2br函数 将换行字符转成 <br>
网友原创的PHP模板类代码
php 特殊字符处理函数
php array_slice函数的使用以及参数详解
php查看session内容的函数
php magic_quotes_gpc的一点认识与分析
推荐学习php sesson的朋友必看PHP会话(Session)使用入门第1/2页
PHP4中session登录页面的应用
php utf-8转unicode的函数第1/2页
改变Apache端口等配置修改方法
比较全的PHP 会话(session 时间设定)使用入门代码
WindowsXP中快速配置Apache+PHP5+Mysql
php中iconv函数使用方法
php出现Cannot modify header information问题的解决方法大全
WINDOWS下php5.2.4+mysql6.0+apache2.2.4+ZendOptimizer-3.3.0配置
Apache+php+mysql在windows下的安装与配置(图文)第1/2页
apache rewrite_module模块使用教程
php在线生成ico文件的代码
<b>一些常用的php函数</b>
©2014-2024 dbsqp.com