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 ";
}
Ïà¹ØÎĵµ£º
IISÉϰ²×°PHP5.3µÄÍêÕû½Ì³Ì·½·¨(¼°5.3.0ÒÔºó°æ±¾µÄ·½·¨)
ÓÉÓÚPHP5.3µÄÈ«ÐÂÌØÐ§¼°¸Ä½ø£¬ÔÓеÄisapi·½Ê½½âÎöPHP
½Å±¾ÒѾ²»±»Ö§³Ö£¬PHP´Ó5.3
.0ÒÔºóµÄ°æ±¾¿ªÊ¼Ê¹ÓÃ΢ÈíµÄfastcgiģʽ£¬ÕâÊÇÒ»¸ö¸üÏȽøµÄ·½Ê½£¬ÔËÐÐËٶȸü¿ì£¬¸üÎȶ¨£¡
а汾
µÄPHP5.3ͨ¹ýÒÔÍùÀÏ·½·¨ÒѾ²»ÄÜÔÚIISÉϰ²×°ÁË£¬ÏÖÔÚ¸ø³öÔÚIISÉϰ²×°PHP5.3ÒÔº ......
<?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
{
......
<div id="time" align="center">time </div>
<script language="javascript">
function time1()
{
var now,n,y,r,h,m,s;
now=new Date();
n = now.getYear();
y = now.getMonth()+1;
r = now.getDate();
h = now.getHours();
m =now.getMinutes();
s = now.getSeconds();
......
Îļþcheck.php
<?php
//Éú³ÉÑéÖ¤ÂëͼƬ
Header("Content-type: image/PNG");
srand((double)microtime()*1000000);//²¥ÏÂÒ»¸öÉú³ÉËæ»úÊý×ÖµÄÖÖ×Ó£¬ÒÔ·½±ãÏÂÃæËæ»úÊýÉú³ÉµÄʹÓÃ
session_start();//½«Ëæ»úÊý´æÈësessionÖÐ
$_SESSION['authnum']="";
$im = imagecreate(62,20); //ÖÆ¶¨Í¼Æ¬±³¾°´óС
$black = ImageC ......
±¾ÎÄת×Ô:http://www.msphome.cn/post/119/
×î½üÒòΪҪ¶ÔÒ»¸öÏîÄ¿½øÐÐÖØ¹¹£¬ËùÒÔÒ»Ö±ÔÚÑо¿PHP¿ò¼Ü¡£´óÌå¿´ÁË¿´Zend Frameworks£¬×ÐϸѧϰÁËÏÂsymfony£¬·¢ÏÖÒ»¸öÁ¼ºÃµÄMVC Web¿ò¼Ü£¬×ãÒԸı俪·¢Ï°¹ß¡£µ«ÊÇÎÞÂÛÊÇZend Frameworks»¹ÊÇsymfony£¬¶ÔÓÚÖÐСÐÍÏîÄ¿µÄ¿ª·¢À´Ëµ¶¼¹ýÓÚÓ·Ö×£¬²¢²»ÄܺܺõÄÌáÉý¿ª· ......