Open crontab file with php

     

I have the following php code to try to get the contents of my root's crontab but nothing is returned.


$cronFile = '/var/spool/cron/root';
$current = file_get_contents($cronFile);  echo $current;  

the permissions on the cron file look like this:


-rw-rw-r-- root root  

Anything I am missing here?

  
"
answer1
  
  

As PHP is executed withing the open_basedir (http://php.net/manual/en/ini.core.php#ini.open-basedir) restrictions you are not allowed to open files outside the specified vhosts