PHP - Globalize namespace contents -


i can't find information related it, thing have namespace this:

// foo.php  namespace foo;  function blah() {  } 

and include / use it

require_once 'foo.php';  foo\blah(); 

now want same without specifying 'foo' time (something using namespace in c++), possible?

require_once 'foo.php'  // using namespace foo;  blah(); // ? 

thank's!

are sure required file in same folder level file calling it? can make checks throwing simple if statement verify.

$file_fnc = '/path/to/foo/file';  if(file_exists($file_fnc)) {     require_once $file_fnc; } else {      echo "file not found";  } 

this determine if file existing. if exists continue debugging there. test , reply


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -