note 115229 added to function.stream-resolve-include-path

From: Date: Tue, 17 Jun 2014 14:49:00 +0000
Subject: note 115229 added to function.stream-resolve-include-path
Groups: php.notes 
Request: Send a blank email to php-notes+get-199700@lists.php.net to get a copy of this message
In case you're running a version of PHP that doesn't have this function... if (!function_exists('stream_resolve_include_path')) { /** * Resolve filename against the include path. * * stream_resolve_include_path was introduced in PHP 5.3.2. This is kinda a PHP_Compat layer for those not using that version. * * @param Integer $length * @return String * @access public */ function stream_resolve_include_path($filename) { $paths = PATH_SEPARATOR == ':' ? preg_split('#(?<!phar):#', get_include_path()) : explode(PATH_SEPARATOR, get_include_path()); foreach ($paths as $prefix) { $ds = substr($prefix, -1) == DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR; $file = $prefix . $ds . $filename; if (file_exists($file)) { return $file; } } return false; } } ---- Server IP: 216.194.115.244 Probable Submitter: 72.183.104.124 ---- Manual Page -- http://php.net/manual/en/function.stream-resolve-include-path.php Edit -- https://master.php.net/note/edit/115229 Del: integrated -- https://master.php.net/note/delete/115229/integrated Del: useless -- https://master.php.net/note/delete/115229/useless Del: bad code -- https://master.php.net/note/delete/115229/bad+code Del: spam -- https://master.php.net/note/delete/115229/spam Del: non-english -- https://master.php.net/note/delete/115229/non-english Del: in docs -- https://master.php.net/note/delete/115229/in+docs Del: other reasons-- https://master.php.net/note/delete/115229 Reject -- https://master.php.net/note/reject/115229 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199700) next »