stream_resolve_include_path

(No version information available, might be only in CVS)

stream_resolve_include_path — Determine what file will be opened by calls to fopen() with a relative path

Описание

string stream_resolve_include_path ( string $filename [, resource $context ] )
Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.

Коментарии

stream_resolve_include_path() seems to cache it's output. After I renamed a file, I had to restart Apache for stream_resolve_include_path() to not return non-existing file name. This was on Windows.
2013-03-28 14:26:55
http://php5.kiev.ua/manual/ru/function.stream-resolve-include-path.html
In some case like this, you can't use `realpath()` or `file_exists()` without resolve its path.

Example:

file.php
subfolder/
..|- included.php
..|- subfolder/
.........|- another-included.php

file.php contents:
```
<?php
var_dump
(file_exists('subfolder/included.php'));// true
include 'subfolder/included.php';
?>
```

subfolder/included.php contents:
```
<?php
var_dump
(file_exists('subfolder/another-included.php'));// false but the file is really exists.
var_dump(file_exists(stream_resolve_include_path('subfolder/another-included.php')));// with `stream_resolve_include_path()` function, it returns true now.
include 'subfolder/another-included.php';// working fine, no errors.
?>
```

subfolder/subfolder/another-included.php contents:
```
<?php
echo 'Hello world';
?>
```
2021-02-07 09:42:36
http://php5.kiev.ua/manual/ru/function.stream-resolve-include-path.html

    Поддержать сайт на родительском проекте КГБ