Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php³£Óú¯Êý2

Îļþ¶ÁÈ¡º¯Ê½
   //Îļþ¶ÁÈ¡º¯Ê½
   function PHP_Read($file_name) {
   $fd=fopen($file_name,r);
   while($bufline=fgets($fd, 4096)){
   $buf.=$bufline;
    }
   fclose($fd);
   return $buf;
    }
   ?>
ÎļþдÈ뺯ʽ
    //ÎļþдÈ뺯ʽ
   function PHP_Write($file_name,$data,$method="w") {
   $filenum=@fopen($file_name,$method);
   flock($filenum,LOCK_EX);
   $file_data=fwrite($filenum,$data);
   fclose($filenum);
   return $file_data;
    }
   ?>
¾²Ì¬Ò³ÃæÉú³Éº¯Ê½
   //¾²Ì¬Ò³ÃæÉú³Éº¯Ê½
   function phptohtm($filefrom,$fileto,$u2u=1){
   if($u2u==1){
   $data=PHP_Read($filefrom);
    }else{
   $data=$filefrom;
    }
   PHP_Write($fileto,$data);
   return true;
    }
   ?>
Ö¸¶¨Ìõ¼þÐÅÏ¢ÊýÁ¿¼ìË÷º¯Ê½
    //Ö¸¶¨Ìõ¼þÐÅÏ¢ÊýÁ¿¼ìË÷º¯Ê½
   function rec_exist($table,$where){
   $query="select count(*) as num from $table ".$where;
   $result=mysql_query($query) or die(nerror(1));
   $rowcount=mysql_fetch_array($result);
   $num=$rowcount["num"];
   if ($num==0){
   return false;
    }
   return $num;
    }
   ?>
Ŀ¼ɾ³ýº¯Ê½
   //Ŀ¼ɾ³ýº¯Ê½
   function del_DIR($directory){
   $mydir=dir($directory);
   while($file=$mydir->read()){
   if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!="..")){
   del_DIR("$directory/$file");
    }else{
   if(($file!=".") AND ($file!="..")){
   unlink("$directory/$file");
   //echo "unlink $directory/$file ok ";
    }


Ïà¹ØÎĵµ£º

Guoqzhang_PHP ¼òÒ×php framework

Guoqzhang_PHP ¼òÒ×php framework    Çë¶àÖ¸µã¡£
Guoqzhang_PHP V 1.0 µÄPHP¿ª·¢¿ò¼Ü£¬²ÉÓÃMVCÉè¼ÆÄ£Ê½£¬ÔËÓÃSmartyÄ£°åÒýÇæÊõºÍMySQLÊý¾Ý¿â¼¼Êõ¿ª·¢¶ø³É¡£
 Éè¼Æµ½¿ª·¢Íê³ÉºÄʱ20¸ö¹¤×÷ÈÕ×óÓÒ£¬Ê±¼ä¶Ì£¬¿ÉÄÜ´æÔÚһЩbug£¬Çë´ó¼ÒÖ¸Õý.×÷Õßmail£ºguoqzhang@gmail.com
url£ºhttp://download.csdn ......

WinXP IIS 5.1 PHP 5.3 VC9.0 ÅäÖÃÏê½â

IISÉϰ²×°PHP5.3µÄÍêÕû½Ì³Ì·½·¨(¼°5.3.0ÒÔºó°æ±¾µÄ·½·¨)
ÓÉÓÚPHP5.3µÄÈ«ÐÂÌØÐ§¼°¸Ä½ø£¬Ô­ÓеÄisapi·½Ê½½âÎöPHP
½Å±¾ÒѾ­²»±»Ö§³Ö£¬PHP´Ó5.3
.0ÒÔºóµÄ°æ±¾¿ªÊ¼Ê¹ÓÃ΢ÈíµÄfastcgiģʽ£¬ÕâÊÇÒ»¸ö¸üÏȽøµÄ·½Ê½£¬ÔËÐÐËٶȸü¿ì£¬¸üÎȶ¨£¡
а汾
µÄPHP5.3ͨ¹ýÒÔÍùÀÏ·½·¨ÒѾ­²»ÄÜÔÚIISÉϰ²×°ÁË£¬ÏÖÔÚ¸ø³öÔÚIISÉϰ²×°PHP5.3ÒÔº ......

phpʵÏÖÒ»¸öÈÕÀúÀà

<?php
 date_default_timezone_set("Etc/GMT-8");
 header("content-type:text/html; charset=utf-8");
 /**
  * ×Ô¼º¶¨ÒåµÄÒ»¸öÉú³ÉÈÕÀúµÄÀà
  * @author ÕÅΰ²Ó<yuanfen860913@163.com>
  * @version 1.0.0
  *
  */
 class myCalendar
 {
  ......

php interface implements multibus

<?php
/*
 * Created on 2009-10-28
 * ·Ö×ÓÈçÃÎo(╯¡õ╰)o
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 interface pusb{
    function verson();
    ......

phpµÄÊý¾Ý²Ù×÷ui

 <?php
 
error_reporting(0);//7all,0no
ini_set('display_errors', '0');
function myerror($errno, $errstr, $errfile, $errline)
{
    echo "<BR>error type: [$errno] $errstr<br />\n";
    echo "in line $errline of file $errfile<BR>";
} ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ