PHP Function Reference

PHP stream_resolve_include_path() Function



The PHP stream_resolve_include_path() function resolves filename against the include path according to the same rules as fopen()/include.

Syntax

stream_resolve_include_path(filename)

Parameters

filename Required. Specify the filename to resolve.

Return Value

Returns a string containing the resolved absolute filename, or false on failure.

Example: stream_resolve_include_path() example

The example below shows the usage of stream_resolve_include_path() function.

<?php
var_dump(stream_resolve_include_path("test.txt"));
?>

The output of the above code will be similar to:

string(22) "/var/www/html/test.txt"

❮ PHP Streams Reference