unable to see file in PHP directory

I am saving a file on my server through file handling like this

$my_file = $_SERVER['DOCUMENT_ROOT'].'/wp-content/themes/mythemev2.0/'.$name.'.php';
echo $my_file;
$handle = fopen($my_file, 'w') or die('Cannot open file:  '.$my_file);

fwrite($handle, $res->name);

$my_file perfectly shows me the complete path of the file. But when I go to the particular directory I am unable to see the file. What could be the error? What else can I do for debugging ?

Related posts

Leave a Reply

1 comment