usage php yourfile,phplibclamav-PHP的杀毒扩展

论坛 期权论坛 脚本     
已经匿名di用户   2022-3-21 23:59   2475   0

Usage

There are several ini options available, although all are set to the recommended defaults. All ini options are marked PHP_INI_SYSTEM to allow for easy shared hosting administration.Name

Default

Effect

clamav.db_path

no value

If this path is set then the module will attempt to preload the path as a ClamAV database at module startup. This will consume memory for every process and so is off by default. If you wanted to guarantee access to a ClamAV database then set this.

clamav.scan_file_uploads

0

If set to a value > 0, and if the clamav.db_path ini option is set and the database is successfully loaded, then files will be scanned during upload. If the scan produces malware, or an error occures then the uploaded file is deleted and the UPLOAD_ERR_EXTENSION error is added to the $_FILES entry. This option is only available for php >= 5.2

clamav.maxfiles

1000

The maximum number of files to scan in an archive.

clamav.maxfilesize

10485760

The maximum filesize of scanned files in bytes.

clamav.maxreclevel

5

The maximum recursion when scanning archives.

clamav.maxratio

200

The maximum compression ratio for scanned files.

This ini option is no longer provided in phplibclamav version 0.6.0 and higher. It remains documented for people running older clamav installations (which is not recommended).

clamav.archivememlimit

0

Memory limit for bzip2 archives. Use 0 for no limit.

mixed clamav_open_db([string path])

This functions opens a ClamAV database ready for scanning files. It must load the database in memory, and so should be called only when used. If you don‘t pass in a path, and you have set a clamav.db_path ini option, you will get that database (if loaded). You may pass in a directory to load all available databases in that directory. If you have previously loaded a directory of databases, say in your php.ini, and the databases change, then the database will automatically reload. In order to avoid the clamav engine startup time during script execution you should set the clamav.db_path ini option, so that the default db path is already loaded. The downside is then memory usage depending on SAPI. This function returns a resource or false on error.

mixed clamav_scan_file(resource db, string file)

This function scans a file for malware using the db previously opened. This function returns a string identifying the malware found, or false if the file is clean.

string clamav_default_db()

This function returns the built in path for ClamAV database files.

mixed clamav_scan_string(resource db, string string_to_scan)

This function is no longer provided in phplibclamav version 0.5.0 and higher. It remains documented for people running older clamav installations (which is not recommended).

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP