when I use this:
require(\"diggstyle_code.php?page=$page_no\");
the warning is :failed to open stream: No error in C:\\xampp\\htdocs\\4ajax\\ga
Though this question is old there's another option that I use which is missing from this thread. You can return a function from the required file which accepts the arguments you want to pass along:
return function(array $something) {
print_r($something);
}
And call it with the arguments when you require
it:
require('file.php')(['some', 'data']);
// or:
$context = require('file.php');
$context(['some', 'data']);