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

PHP 压缩文件夹的类!

 <?php
/*
  $Id: PHPZip.php
*/
class PHPZip {
  var $datasec      = array();
  var $ctrl_dir     = array();
  var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
  var $old_offset   = 0;
  function Zip($dir, $zipfilename) {
    if (@function_exists('gzcompress')) {
      @set_time_limit("0");
      $this->openFile($dir,$dir);
      $out = $this -> filezip();
      $fp = fopen($zipfilename, "w");
      fwrite($fp, $out, strlen($out));
      fclose($fp);
    }
  }
  function openFile($path, $zipName) {
     
    $temp_path = $path;
    $temp_zip_path = $zipName;
    $zipDir = $zipName;
    if ($handle = @opendir($path)) {
      while (false !== ($file = readdir($handle))) {
        if($file !='.' and $file !='..'){
          if(ereg('\.' , $file.@basename())) {
            $fd = fopen($path.'/'.$file, "r");
            $fileValue = @fread ($fd, 1024000);
            fclose ($fd);
            $this -> addFile($fileValue, $zipName . '/' . $file);
          } else {
            $this ->openFile($path.'/'.$file, $zipName . '/' . $file);
          }
  &nbs


相关文档:

用php过滤表单提交中的危险html代码

用PHP过滤提交表单的html代码里可能有被利用引入外部危险内容的代码。例如,有些时候用户提交表单中含有html内容,但这可能造成显示页面布局混乱,需要过滤掉。
以下是程序代码:
复制代码
function uhtml($str) 

    $farr = array( 
    ......

PHP中的常用的25个MYSQL函数

1、mysql_connect()-建立数据库连接 {3RY4HVT?  
格式: Fv n:V\eb  
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]]) _I;+p eq  
例: 1(V>8}zn  
$conn = @mysql_connect("localhost", "username", "password") or dir(" ......

详细解释PHP中header和content


void header ( string string [, bool replace [, int http_response_code]] )
void header ( string string [, bool replace [, int http_response_code]] )
header()是用来发送 HTTP Header的。replace是个可选的参数,指示是否替代一个先期相似的header,
......

php:global变量的使用

global定义一个全局变量,这个全局变量不是应用整个网站,而是应用与当前页面(包括require和include文件)文件。
$aa="test";
function test()
{
    global $aa;
    echo $aa;
}
test(); //print test
函数内定义的变量函数外可以调用,在函数外定义的的变量函数内不能使用。
gl ......

PHP与CURL

openpne开源SNS
用PHP模拟126邮箱的登陆过程来收取邮件:http://www.cnblogs.com/amboyna/archive/2009/04/29/1446487.html
php调用其他系统的接口整理:http://blog.chinaunix.net/u2/84280/showart_2065156.html
问题:我是想写一个网上给手机发短信的功能 调用了一个第三方的飞信接口
飞信接口PHP版 (免费发短信) v1. ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号