I had made a PHP file using fopen and fwrite and I am trying to execute that file but it's giving me
Internal Server Error
while making file I had to change the permission to 0775
using chmod
$book="829310_Revolution_Test_(5)-converted_(4).epub.php";
$book=str_replace(" ","_",$book);
$path=$book.".php";
$myfile =fopen("../../include/uploaded/epub/$path", "w") or die("Unable to open file!");
$txt = "<?php include('hello.php'); ?>";
fwrite($myfile, $txt);
fclose($myfile);
chmod("../../include/uploaded/epub/$book", 0775);
chmod("../../include/uploaded/epub/$path", 0775);
I want user can execute this file but while trying to execute this file I am getting an Internal Server Error.