[php-src] Issue #8402: file_exists(): open_basedir restriction in effect
| From: | gold22 | Date: | Tue, 19 Apr 2022 19:42:49 +0000 |
| Subject: | [php-src] Issue #8402: file_exists(): open_basedir restriction in effect | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241080@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8402
Author: gold22
### Description
The following code:
```php
<?php
echo file_exists('C:\Test\test?') ? 'exists' : 'not exists';
```
Resulted in this output:
```
PHP Warning: file_exists(): open_basedir restriction in effect. File(C:\Test\test?) is not within
the allowed path(s): (C:\Test) in C:\Test\test.php on line 2
PHP Stack trace:
PHP 1. {main}() C:\Test\test.php:0
PHP 2. file_exists($filename = 'C:\\Test\\test?') C:\Test\test.php:2
not exists
```
But I expected this output instead:
```
not exists
```
### PHP Version
PHP 7.4.x, 8.0.x
### Operating System
Windows