I am trying to change the path of a file (saved in /foo/bar directory) to the root
forexample
www.example.com/foo/bar/user.php
to
www.example.com/user.php
using chroot() function
<?php
chroot("/foo/bar/user.php");
$n=getcwd();
echo $n;
it's not working, I am getting the following php error :
call to undefined function chroot()
I am using php 5.3*, But I have also tested it on 5.4+ , still the same error. I am not sure if it is because of the the versions or something else,
Please help!