只需一步,快速开始
查看全部评分
举报
编译安装了pecl-htscanner之后 将会生成一个名称为htscanner.so的php模块 被加载在/usr/local/etc/php/extensions.ini中 extension=htscanner.so 之后的phpinfo可以看到这个模块被加载,并且带有一些开关变量 之后加载和执行htaccess的任务就会由php-cgi来完成 不再依赖httpd层
$cd /usr/ports/devel/pecl-htscanner $make install clean lighttpd.conf中的access-deny定义如下(防止被人get去) url.access-deny = ( “~”, “.inc”, “.htaccess” ) $/usr/local/etc/rc.d/lighttpd restart .htaccess的格式 php_value include_path .:/home/user_xx/include_dir php_flag register_global on pS:value一定不要加引号,我在这郁闷了很久……
htscanner 作用: 利用 .htaccess 設置 php_flag、php_value 變更 php 參數 (Ref: Tsung's Blog & PHP 手冊) wget http://pecl.php.net/get/htscanner-0.8.0.tgz tar zxf htscanner-0.8.0.tgz cd htscanner-0.8.0 /usr/local/php-fcgi/bin/phpize ./configure \ --enable-htscanner \ --with-php-config=/usr/local/php-fcgi/bin/php-config make && make install cat ./docs/htscanner.ini >> /usr/local/php-fcgi/lib/php.ini vi /usr/local/php-fcgi/lib/php.ini extension_dir="/usr/local/php-fcgi/lib/php/extensions/no-debug-non-zts-20020429/" extension="htscanner.so" htscanner.config_file=".htaccess" htscanner.default_docroot="/var/www/html" htscanner.default_ttl=300 htscanner.stop_on_error=0 ps.原本無 "htscanner." 要加上去才有效果
作用: 利用 .htaccess 設置 php_flag、php_value 變更 php 參數 (Ref: Tsung's Blog & PHP 手冊) wget http://pecl.php.net/get/htscanner-0.8.0.tgz tar zxf htscanner-0.8.0.tgz cd htscanner-0.8.0 /usr/local/php-fcgi/bin/phpize ./configure \ --enable-htscanner \ --with-php-config=/usr/local/php-fcgi/bin/php-config make && make install cat ./docs/htscanner.ini >> /usr/local/php-fcgi/lib/php.ini vi /usr/local/php-fcgi/lib/php.ini extension_dir="/usr/local/php-fcgi/lib/php/extensions/no-debug-non-zts-20020429/" extension="htscanner.so" htscanner.config_file=".htaccess" htscanner.default_docroot="/var/www/html" htscanner.default_ttl=300 htscanner.stop_on_error=0 ps.原本無 "htscanner." 要加上去才有效果
extension_dir="/usr/local/php-fcgi/lib/php/extensions/no-debug-non-zts-20020429/" extension="htscanner.so" htscanner.config_file=".htaccess" htscanner.default_docroot="/var/www/html" htscanner.default_ttl=300 htscanner.stop_on_error=0 ps.原本無 "htscanner." 要加上去才有效果
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|全球主机交流论坛
GMT+8, 2025-9-25 23:07 , Processed in 0.068875 second(s), 15 queries , Gzip On, MemCache On.
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.