php - How to find which file is being loaded by a (relative path) require() without looking through all the folders in the include_path -


i have script installed on multiple servers first line being:

require_once 'mdb2.php'; 

on servers file being found shared folder somewhere, on others file isn't found. there quick way log or output files (ie folder in) being loaded require or include call, without having determine include_path value , search through folders specified value?

according include documentation on php site there doesn't appear faster way following:

<?php  function include_which($filename) {     $dirs = explode(':', ini_get('include_path'));     foreach ($dirs $dir) {         if (is_file("{$dir}/{$filename}")) {             return "{$dir}/{$filename}";         }     } } 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -