Sets the include_path configuration option
Syntax
set_include_path(string $include_path): string|false
Parameters
include_path
The new value for the include_path
Return
Returns the old include_path on success or false on failure.
Examples
1 · include_path
<? $include_path = '/usr/lib/pear'; $return = set_include_path($include_path); echo $return; ?>
.:/opt/alt/php82/usr/share/pear:/opt/alt/php82/usr/share/php:/usr/share/pear:/usr/share/php
2 · PATH_SEPARATOR
<? $include_path = get_include_path() . PATH_SEPARATOR . '/usr/lib/pear'; $return = set_include_path($include_path); echo $return; ?>
.:/opt/alt/php82/usr/share/pear:/opt/alt/php82/usr/share/php:/usr/share/pear:/usr/share/php
3 · ini_set
<? $option = 'include_path'; $value = '/usr/lib/pear'; $return = ini_set($option, $value); echo $return; ?>
.:/opt/alt/php82/usr/share/pear:/opt/alt/php82/usr/share/php:/usr/share/pear:/usr/share/php