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 ";
}
Ïà¹ØÎĵµ£º
Blogϵͳ×÷Ϊ´ó¼Ò×î³£½Ó´¥µÄ»¥ÁªÍø¶«¶«£¬ÔÚÕ¾³¤ÈºÌåÖм¸ºõÈËÊÖÒ»²©£¬´ÓÖªÃûÃÅ»§µÄ²©¿ÍƵµÀ£¬µ½ÍøÂçÓªÏúר¼Ò²©¿Í£¬ÍøÃñ¶Ô²©¿ÍµÄ¹Ø×¢¶ÈÔÚ²»¶ÏÌá¸ß²¢É¡£Ä¿Ç°ÍøÉÏÃâ·ÑµÄblogϵͳ̫ÔÓ£¬ÔÚ´ËÕûÀíPHP°æµÄBlog½éÉÜÈçÏ£º
1¡¢wordpress:http://www.wordpress.org ¹¦ÄÜÒ²ºÜÈ«Ãæ£¬Ó¦¸ÃÊÇÖ§³ÖblogµÄÊ×Ñ¡¡£ËüÓÐ×îÇ¿µÄÄ£°æ¹¦ÄÜ£¬ÒѾ ......
<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 ......
[תÌù] Õ¥¸É PHP,²»µÃ²»×ªµÄһƪPHPʹÓü¼ÇÉ!
ÕâÆªÔÓÎÄ·ÒëÕûÀí×ÔÍøÂç¸÷·Îĵµ×ÊÁÏ(¼û×îÄ©µÄ²Î¿¼×ÊÁÏ)£¬ÓÈÆäÊÇ Ilia Alshanetsky (Åå·þÖ®ÖÁ) ÔÚ¶à¸ö PHP »áÒéÉϵÄÑݽ²£¬Ö÷ÒªÊǸ÷ÀàÌá¸ß PHP ÐÔÄܵļ¼ÇÉ¡£ÎªÇó¾«×¼£¬ºÜ¶à²¿·Ö¶¼ÓÐÏêϸµÄЧÂÊÊý¾Ý£¬ÒÔ¼°¶ÔÓ¦µÄ°æ±¾µÈµÈ¡£ÍµÀÁ£¬Êý¾Ý¾Í²»Ò»Ò»¸ø³öÁË£¬Ö±½Ó¸ø½áÂÛ£¬Èç¹ûÐèÒª¿´ÔÎ ......
ÔÚΪÓû§Ìṩ¶¯Ì¬ÄÚÈÝ·½Ã棬PHPºÍMySQLÊÇÒ»¸öÇ¿´óµÄ×éºÏ¡£ÕâЩÄêÀ´£¬ÕâÁ½Ïî²úÆ·ÒѾ¿çÔ½ÁËËüÃÇ×î³õµÄÓ¦ÓÃÎę̀£¬ÏÖÔÚ£¬Ò»Ð©ÊÀ½çÉÏ×æµÄÍøÕ¾Ò²ÔÚÓ¦ÓÃËüÃÇ¡£ËäÈ»ËüÃǵ±³õ¶¼ÊÇ¿ªÔ´Èí¼þ£¬Ö»ÄÜÔÚUNIX/LinuxÉÏÔËÐУ¬µ«¾¹ýÏ൱һ¶ÎʱÆÚµÄ·¢Õ¹£¬ËüÃÇÒÑÄÜÔÚWindowsƽ̨ÉÏÔËÐС£
ÔÚ±¾ÎÄÖУ¬ÎÒ½«Öð²½ÎªÄãÃÇ˵Ã÷ÈçºÎÔÚWindows»·¾³ÖÐ ......