I already know that include_once
would return true
or false
based on including that file. I've read a question on Stackoverflow about using require_once to return your value and print it out.
The problem is that I have an existing project in hand, and inside of that file they return an array. I want to get the output of require_once
to see what result I've got, but I get 1 instead of array
that contains data:
return array('data'=>$result_data,'error'=>null);
What I do is:
$ret = require_once $this->app->config('eshopBaseDir')."fax/archive.php";
print_r($ret);
Is there any workaround for this?