The xattr extension allows for the manipulation of extended attributes on a filesystem.
To use xattr, you will need libattr installed. It is available at » http://oss.sgi.com/projects/xfs/.
Note: These functions only work on filesystems that support extended attributes, and have them enabled at mount time. Some common filesystems that support extended attributes are ext2, ext3, reiserfs, jfs, and xfs.
xattr is currently available through PECL » http://pecl.php.net/package/xattr.
If » PEAR is available on your *nix-like system you can use the pear installer to install the xattr extension, by the following command: pear -v install xattr.
You can always download the tar.gz package and install xattr by hand:
Example#1 xattr install by hand
gunzip xattr-xxx.tgz tar -xvf xattr-xxx.tar cd xattr-xxx phpize ./configure && make && make install
以下的常數由此延伸定義,只在這個延伸被編譯成PHP或實行時期被動態載入時有效。