php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74191 file_exists needs option to use include path
Submitted: 2017-03-01 15:51 UTC Modified: 2017-03-08 05:07 UTC
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dpfender44 at gmail dot com Assigned:
Status: Open Package: *General Issues
PHP Version: 7.1.2 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dpfender44 at gmail dot com
New email:
PHP Version: OS:

 

 [2017-03-01 15:51 UTC] dpfender44 at gmail dot com
Description:
------------
It would be nice to have an option for file_exists() that would do a search using the include path.  This would allow a validity check for a file to be included with "include_once" or "require_once".  These functions use the include path to find a file.  Currently, I have programmed my own function called my_file_exists() to be used instead of file_exists() so the test is done on all directories in the include path.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-08 05:07 UTC] pollita@php.net
? This wouldn't actually be terribly difficult, but I have to ask: Given that it's fairly trivial to do in userspace, what's the problem with doing it there?
 [2017-07-31 21:22 UTC] gmblar+php at gmail dot com
try https://secure.php.net/manual/en/function.stream-resolve-include-path.php
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Mar 20 03:01:26 2019 UTC