• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • apache 限制某些目錄不能用php

    發表于:2007-05-25來源:作者:點擊數: 標簽:
    php.ini safe_mode=On ;Bydefault,SafeModedoesaUIDcomparecheckwhen ;openingfiles.Ifyouw ant torelaxthistoaGIDcompare, ;thenturnonsafe_mode_gid. safe_mode_gid=Off ;Whensafe_modeison,UID/GIDchecksarebypassedwhen ;includingfilesfromthisdirector

    php.ini 



    safe_mode = On 

    ; By default, Safe Mode does a UID compare check when 
    ; opening files. If you want to relax this to a GID compare, 
    ; then turn on safe_mode_gid. 
    safe_mode_gid = Off 

    ; When safe_mode is on, UID/GID checks are bypassed when 
    ; including files from this directory and its subdirectories. 
    ; (directory must also be in include_path or full path must 
    ; be used when including) 
    safe_mode_include_dir = 

    ; When safe_mode is on, only executables located in the safe_mode_exec_dir 
    ; will be allowed to be executed via the exec family of functions. 
    safe_mode_exec_dir = 

    ; open_basedir, if set, limits all file operations to the defined directory 
    ; and below. This directive makes most sense if used in a per-directory 
    ; or per-virtualhost web server configuration file. 

    open_basedir =

     haohaoo 回復于:2003-01-18 12:57:53
    safe_mode_include_dir = 
    safe_mode_exec_dir = 

    open_basedir =
    那個后面加不開放php權限的目錄

     南非蜘蛛 回復于:2003-01-18 13:16:39
    上面有說明,測試一下就知道了,不是很難
    我現在手里沒有機器

     一顆小白菜 回復于:2003-01-19 11:05:01
    [quote:bf387d5aea="haohaoo"]safe_mode_include_dir = 
    safe_mode_exec_dir = 

    open_basedir =
    那個后面加不開放php權限的目錄[/quote:bf387d5aea]

    open_basedir 用來指定只在某一個目錄中執行PHP

    對不需要開放PHP權限的目錄,在PHP的 Apache-specific Functions 章節中有以下一句:
    [quote:bf387d5aea]
     The behaviour of the Apache PHP module is affected by settings in php.ini. Configuration settings from php.ini may be overridden by php_flag settings in the server configuration file or local .htaclearcase/" target="_blank" >ccess files.
    [/quote:bf387d5aea]
    接著,有一個示例
    [quote:bf387d5aea]
    php_flag engine off
    [/quote:bf387d5aea]

    [quote:bf387d5aea]
    engine  boolean

        This directive is really only useful in the Apache module version of PHP. It is used by sites that would like to turn PHP parsing on and off on a per-directory or per-virtual server basis. By putting engine off in the appropriate places in the httpd.conf file, PHP can be enabled or disabled. 
    [/quote:bf387d5aea]

    因此,我們只需要在不需要PHP權限的目錄或者虛擬主機設置段(目錄為<Directory>,虛擬主機為<VirualHost>中加上
    [code:1:bf387d5aea]php_flag engine off[/code:1:bf387d5aea]

     南非蜘蛛 回復于:2003-01-19 13:10:01
    原來有php專家,我就不獻丑了,呵呵,謝謝小白菜

     南非蜘蛛 回復于:2003-01-19 13:25:46
    php_value name value 
    Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a previously set value use none as the value. 


    php_value auto_prepend_file none 




    php_flag name on|off 
    Used to set a Boolean configuration directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. 

    php_admin_value name value 
    Sets the value of the specified directive. This can NOT be used in .htaccess files. Any directive type set with php_admin_value can not be overridden in .htaccess files. 

    php_admin_flag name on|off 
    Used to set a Boolean configuration directive. This can NOT be used in .htaccess files. Any directive type set with php_admin_flag can not be overridden in .htaccess files. 


    Example 4-2. Apache configuration example 

    <IfModule mod_php4.c> 
    php_value include_path ".:/usr/local/lib/php" 
    php_admin_flag safe_mode on 
    </IfModule> 
    <IfModule mod_php3.c> 
    php3_include_path ".:/usr/local/lib/php" 
    php3_safe_mode on 
    </IfModule>

     一顆小白菜 回復于:2003-01-19 14:00:30
    [quote:d0206cc7c3="南非蜘蛛"]原來有php專家,我就不獻丑了,呵呵,謝謝小白菜[/quote:d0206cc7c3]

    嘿~~  蜘蛛也在諷刺我了?嘿嘿    這里可是你的地盤哦  嘿嘿

    我也只是前幾天看文檔的時候才注意到的

     南非蜘蛛 回復于:2003-01-19 14:04:23
    共同學習,我看了兩天資料,系統的學習了一下,apache真是博大精深呀

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>