易截截图软件、单文件、免安装、纯绿色、仅160KB

php下载文件相关资料

当下载文件需要与服务端交互时,就需要用脚本来实现,而不是单纯地链接到文件的地址
下载mp3文件的例子
<?php
$file_path = './data/upload/song/sample.mp3';
$file_name = 'sample.mp3';
$file_size = filesize($file_path);
header ( "Pragma: public" );
header ( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
header ( "Cache-Control: private", false );
header ( "Content-Transfer-Encoding: binary" );
header ( "Content-Type:audio/mpeg MP3");
header ( "Content-Length: " . $file_size);
header ( "Content-Disposition: attachment; filename=".$file_name);
echo(file_get_contents($file_path));
exit;
?>
以下列表来自http://hi.baidu.com/zbzb /blog/item/643cd60021d25d11738b6530.html
Content-type 的说明 '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/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'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.wmlscriptc',
'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',
'di


相关文档:

一款php 的mvc 开源框架openbiz

看到同学们有不少在用php开发项目的,或许下面的资料对大家有用吧,用来学习一下也好。
收集的资料相关地址:
 
cubi demo site:http://dev.openbiz.cn/cubi/user/login
openBiz app cubi:http://docs.google.com/View?id=df5ktjv9_64f9fd88gf
openbiz architecture overview:   
  http: ......

利用ip地址查询区域 php程序

该程序没有优化 只是最原始的程序  可以将其与flash结合起来!
与flash结合起来就是将php得到的地址和区域 打印出来再返回个flash端这么简单
<?php
$getIP="218.11.140.23"; // 这里是自己随便写的一个ip  实际时你还要通过程序得到这个ip
//只开始时查前三段
$subIPs=explode(".",$getIP);
$subIP=$sub ......

21个实用便利的PHP代码

1. PHP可阅读随机字符串
此代码
将创建一个可阅读的字符串,使其更接近词典中的单
词,实用且具有密码验证功能。
/**************
[email=*@length]*@length[/email] - length of random string (must be a
multiple of 2)
**************/
function readable_random_string($length = 6){
    $conso= ......

php文件上传类

 
<?php
  /**
  * PHP100.com - 个人感觉非常简单,只要有点PHP基础滴人都应该能看懂~~
  * Apache2 + PHP5.0
  * Version:1.0
  * 同时感谢PHP100所有的兄弟们
  * ——————————————&m ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号