Posts Tagged ‘php’

/e/class/delpath.php

星期六, 十月 24th, 2009

用于删除文件目录
应该是老大很早以前写的类了 版权上下都有
用于删除目录和文件
包含一个类3个方法
wm_chief_delpath()
wm_chief_file()
wm_chief_path()

如果目录中有目录就返回重新读新发现的目录 目录中的文件 然后删除目录,如此循环 目录和文件全删了

wm_chief_delpath($del_s_path);
                                }

                                /*其他情况 也就是不是目录的情况即为文件的情况 执行大括号中内容*/
                                else{
                                        $del_file=$del_path."/".$file;

                                        /* 使用本类中 wm_chief_file处理$del_file*/
                                        $this->wm_chief_file($del_file);
                                }
                        }
                }//while循环结束

                /*关闭*/
                @closedir($hand);

                /*使用本类中的 wm_chief_path函数处理*/
                $this->wm_chief_path($del_path);

                /**/
                return  true;
        }

        // unlink() PHP自由函数,用于删除文件:若成功,则返回 true,失败则返回 false。
        function  wm_chief_file($del_file){
                @unlink($del_file);
        }

        //删除目录 rmdir() 函数删除空的目录。若成功,则该函数返回 true。若失败,则返回 false。
        function  wm_chief_path($del_path){
                @rmdir($del_path);
        }
}

//本程序由wm_chief原创,如要转载,请注明作者与来源(http://www.phome.net)
?>

Tags: , , , , , , , , , , ,

/e/class/enpath.php

星期六, 十月 24th, 2009

防盗链加密文件已经被注释和很短
被引用闻之为
e/class/DownSysFun.php
e/class/connect.php


Tags: , , , ,

汉了一下PHPXref,最近可能发一个汉化版

星期日, 七月 12th, 2009

phpxref-hanization.jpg

(更多…)

Tags: ,

PHPXref PHP大型项目开发,学习PHP好工具

星期三, 七月 8th, 2009

logo.gif一、关于PHPXref

PHPXref是一个PHP开发工具,它可以非常容易的解决PHP大型项目中对PHP程序中常量、变量、函数、类的查找和相互参考负担;PHPXref可以将项目文件扫描连同代码本身编译成HTML,不需要任何软件支持就可以轻松的对照查阅项目中的项目程序中常量、变量、函数、类等。十分方便。

(更多…)

Tags: , , , , ,

Install php

星期六, 三月 7th, 2009

#tar zxvf php-5.2.6.tar.gz
# ./configure –prefix=/usr/local/php5 –with-

apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local –with-

gd=/usr/local/libgd –enable-gd-native-ttf –with-ttf –enable-gd-jis-

conv –with-freetype-dir=/usr/local/freetype –with-jpeg-

dir=/usr/local/libjpeg –with-png-dir=/usr/local/libpng –with-libxml-

dir=/usr/local/libxml2 –with-zlib-dir=/usr/local/zlib –enable-xml –

enable-mbstring –enable-sockets
#make
#make install
#cp php.ini-dist /usr/local/php5/lib/php.ini
#vi /etc/httpd.conf

ADD:

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
#/usr/local/apache2/bin/apachectl stop &

我没有遇到下面的问题,貌似装系统的时候没有启动

这里出现一个错误:
httpd: Syntax error on line 53 of /etc/httpd.conf: Cannot load

/usr/local/apache2/modules/libphp5.so into server:

/usr/local/apache2/modules/libphp5.so: cannot restore segment prot after

reloc: Permission denied

解决办法:关闭 SELinux

vi /etc/sysconfig/selinux
屏蔽掉,
#SELINUX=enforcing
然后添加
SELINUX=disabled

Tags: