Pear's PHP_Compat package. read Pear's PHP_Compat package. Pear's PHP_Compat is an interesting package. It provides some php5 proprietary functions that can be used in php4, such as file_put_contents, array_combine, str_split .......... in this way, even on the php4 host, you can enjoy one in advance.
Pear's PHP_Compat is an interesting package. It provides some php5 proprietary functions that can be used in php4, such as file_put_contents, array_combine, str_split .......... in this way, even on the php4 host, you can enjoy the convenience of the php5 function in advance.
Usage
PLAIN TEXT
PHP:
Require_once 'php/Compat. php ';
// Load file_put_contents
PHP_Compat: loadFunction ('File _ put_contents ');
// Load str_split, array_chunk and file_get_contents
PHP_Compat: loadFunction (array ('Str _ split ', 'Array _ chunk', 'File _ get_contents '));
?>
The preceding example shows that n php5 special functions can be loaded at a time.
Package Information: PHP_Compat
Http://pear.php.net/package/PHP_Compat
Author: volcano was published on March 13, 2006 at am.
Copyright information: This information can be reproduced at will. during reprinting, you must mark the original source and author information of the article in the form of hyperlinks and this statement.
Permanent link-http://www.ooso.net/index.php/archives/267