Again, you won’t be able to use URL’s, it must be a full physical path on your server. I just tested the snippet, which I named
includefile, by creating a file called test.php in my assets/snippets folder, and called it like this:
[[includefile? &file=`assets/snippets/test.php`]]
Worked like a charm. Make sure your file exists, and if you continue to have trouble, try this code in your snippet to reveal the actual $file value being used:
<?php
$file= isset ($file)? $modx->config['base_path'] . $file: '';
if ($file && file_exists($file)) {
$output= include($file);
} else {
$output= $file;
}
return $output;
//$modx->sendErrorPage();
?>
Also, make sure you have template set to (blank) and that the page is not cacheable (or if it is, you care calling the snippet uncached, e.g. [!includefile? &file=`path\foo\bar.ext`!]