PHP set_include_path() Function Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The set_include_path() function is an inbuilt function in PHP that sets the include_path configuration option. Syntax: string|false set_include_path(string $include_path)Parameters: This function accepts one parameter that is described below: $include_path: This parameter specifies the new value for the include_path.Return Value: This function returns the old include_path on successful, otherwise returns "false". Example 1: In this example, we will use the set_include_path() function. PHP <?php $path = "/home/dachman" ; if(true == set_include_path($path)){ echo "Path is set now" ; } else { echo "Path is not set now" ; } ?> Output: The path is set now Example 2: In the below code, we will check the path before using the set_include_path() function. PHP <?php $path = "/home/dachman" ; // Before using set_include_path() function. echo get_include_path()."\n"; set_include_path($path) ; echo get_include_path() ; ?> Output: .:/usr/share/php /home/dachman Reference: https://www.php.net/manual/en/function.set-include-path.php Comment More infoAdvertise with us Next Article PHP set_include_path() Function neeraj3304 Follow Improve Article Tags : PHP PHP-function PHP-Options-info Similar Reads PHP get_include_path() Function The get_include_path() function is an inbuilt function in PHP that returns the current include_path to the caller. Syntax: string|false get_include_path()Parameter: This function does not accept any parameters. Return Value: This function returns the path in the string format, or "false" otherwise. 1 min read PHP | SplFileInfo getPath() Function The SplFileInfo::getPath() function is an inbuilt function of Standard PHP Library (SPL) in PHP which is used to return the path without filename. Syntax: string SplFileInfo::getPath( void ) Parameters: The function does not accept any parameter. Return Value: This function returns the path of file 1 min read PHP | pathinfo( ) Function The pathinfo() is an inbuilt function which is used to return information about a path using an associative array or a string. The returned array or string contains the following information:  Directory nameBasenameExtension The path and options are sent as a parameters to the pathinfo() function a 2 min read PHP get_included_files() Function The get_included_files() is an inbuilt function that returns an array with names of included or required files. Syntax: get_included_files(): array Parameters: This function does not accept any parameters. Return Values: It returns an array of the names of files. Example 1: This example demonstrate 1 min read PHP | ImagickDraw pathStart() Function The ImagickDraw::pathStart() function is an inbuilt function in PHP which is used to declare the start of a path drawing list. Later, pathFinish() function is used to terminate this list. Syntax: bool ImagickDraw::pathStart( void ) Parameters: This function doesnât accept any parameters. Return Valu 2 min read PHP | stream_is_local() Function The stream_is_local() function is an inbuilt function in PHP which is used to check if a stream is a local stream or URL. Syntax: bool stream_is_local( $stream ) Parameters: This function accepts single parameter $stream, which is used to specify the stream to be check. Return Value: This function r 1 min read PHP | ImagickDraw pathFinish() Function The ImagickDraw::pathFinish() function is an inbuilt function in PHP which is used to terminate the current path. This is required when multiple paths are to be drawn in the image. Syntax: bool ImagickDraw::pathFinish( void ) Parameters: This function doesnât accepts any parameter. Return Value: Thi 2 min read PHP | SplFileInfo getPathname() Function The SplFileInfo::getPathname() function is an inbuilt function of Standard PHP Library (SPL) in PHP which is used to get the path of file. Syntax: string SplFileInfo::getPathname( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the path of the file 1 min read PHP | SplFileInfo getRealPath() Function The SplFileInfo::getRealPath() function is an inbuilt function of Standard PHP Library (SPL) in PHP which is used to get absolute file path. Syntax: int SplFileInfo::getRealPath( void ) Parameters: This function does not accept any parameter. Return values: This function returns the path to the file 1 min read PHP | link( ) Function The link() creates a hard link for a specified target. The target and the link are passed as parameters to the link() function and it returns true on success and false on failure.Syntax: link(target, link)  Parameters Used: The link() function in PHP accepts two parameters. target : It is a manda 2 min read Like