set_include_path

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

set_include_path���� include_path ����ѡ��

˵��

set_include_path ( string $new_include_path ) : string

Ϊ��ǰ�ű����� include_path ����ʱ������ѡ�

����

new_include_path

include_path �µ�ֵ��

����ֵ

�ɹ�ʱ���ؾɵ� include_path ������ʧ��ʱ���� FALSE��

����

Example #1 set_include_path() ����

<?php
set_include_path
('/usr/lib/pear');

// ��ʹ�� ini_set
ini_set('include_path''/usr/lib/pear');
?>

Example #2 ��ӵ�include path

���ó��� PATH_SEPARATOR �ɿ�ƽ̨��չ include path��

������������ǰ� /usr/lib/pear ��ӵ��� ���е� include_path ��β����

<?php
$path 
'/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR $path);
?>

�μ�