sma4win数据处理_WinCache Functions Reroutes

WinCache Functions Reroutes

NOTE: wincache.rerouteini was removed as of

WinCache 1.3.7.0. It has been replaced with automatic function reroutes. See:

wincache.reroute_enabled.

The WinCache functions reroutes (available since WinCache 1.2.0, removed since WinCache 1.3.7.0) can be used to replace built-in PHP functions with their equivalents

that are optimized for a particular purpose. WinCache extension includes Windows-optimized implementation of PHP file functions that

may improve performance of PHP applications in cases when PHP has to access files on network shares. The optimized implementation is

provided for the following functions: file_exists

file_get_contents

readfile

is_readable

is_writable

is_dir

realpath

filesize

To configure WinCache to use the functions reroutes use the file reroute.ini that is included in

WinCache installation package. Copy this file into the same directory where php.ini

file is located. After that add the wincache.rerouteini setting in php.ini

and specify an absolute or relative path to the reroute.ini file.

Example #1 Enabling WinCache functions reroutes

wincache.rerouteini = C:\PHP\reroute.ini Note:

If WinCache functions reroutes are enabled it is recommended to increase the WinCache file cache size. This

can be done by using wincache.fcachesize setting.

The reroute.ini file contains the mappings between the native PHP functions and

their equivalents in WinCache. Each line in the file defines a mapping by using the following syntax:

:[]=

The example of the file is shown below. In this example the calls to PHP function file_get_contents()

will be replaced with calls to wincache_file_get_contents() only if the number of parameters passed to

the function is less than or equals to 2. Specifying the number of parameters is useful when replacement function

does not handle all the function's parameters.

Example #2 Reroute.ini file content

[FunctionRerouteList]

file_exists=wincache_file_exists

file_get_contents:2=wincache_file_get_contents

readfile:2=wincache_readfile

is_readable=wincache_is_readable

is_writable=wincache_is_writable

is_writeable=wincache_is_writable

is_file=wincache_is_file

is_dir=wincache_is_dir

realpath=wincache_realpath

filesize=wincache_filesize

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值