title: Unable to open file while writing php file
body: <p>I am trying to use fopen and fwrite </p>
  
  <pre><code>$book="http://bittotb.com/synthesis_study_material/student_admin/include/uploaded/epub/923960_hotel (1).epub";
  $path=$book.".php";
  $myfile =fopen($path, "w");
  $txt = "&lt;?php include('hello.php'); ?&gt;";
  fwrite($myfile, $txt);
  fclose($myfile);
  </code></pre>
  
  <p>when I just write the file name in fopen like</p>
  
  <pre><code>$myfile =fopen("abc.php", "w");
  </code></pre>
  
  <p>then it's making a file in the same directory but I want to make that file in another directory. while using path it's not working if I echo the $path then I am getting</p>
  
  <pre><code>http://bittotb.com/synthesis_study_material/student_admin/include/uploaded/epub/923960_hotel (1).epub.php
  </code></pre>
  
  <p>this is correct file name and path but still, it's giving me Unable to open the file and my folder permission shows 0777</p>