Your syntax is wrong, have a try with this instead to get started:
<?php
$cache = file_get_contents('a.php');
file_put_contents('page.php', $cache);
The documentation of file_put_contents()
clearly states that it requires two arguments (or more). First the path to the file to write to, second the content to write into the file. You provided only a single argument, since you concatenated two things using the .
operator.
However in this case: wouldn't it be easier to just copy the file instead?
Your comment below suggests that you indeed want to concatenate some variables value to what you write into the output file. Just concatenate it then:
<?php
$cache = file_get_contents('a.php');
$cache .= $var;
$cache .= ob_get_contents();
file_put_contents('page.php', $cache);