search

php的dl函数

Jun 13, 2016 am 10:45 AM
examplehttpphpfunctionof

 

http://www.php.net/manual/en/function.dl.php

// Example loading an extension based on OS

if (!extension_loaded('sqlite')) {

    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {

        dl('php_sqlite.dll');

    } else {

        dl('sqlite.so');

    }

}

 

// Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0

if (!extension_loaded('sqlite')) {

    $prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';

    dl($prefix . 'sqlite.' . PHP_SHLIB_SUFFIX);

}

?>

 

dl("memcache.so");

这样只要php.ini中配置好就可以不要再引用so文件不然会说多处引用

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"

;extension=memcache.so

 

作者 21aspnet

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!