Warning: fopen(Review Title.php): failed to open stream: Inappropriate ioctl for device in /home/anime/public_html/reviewscript/review.php on line 13
Could not create file!
Any ideas on what the problem could be?
<?php
$fileName = $_REQUEST['title'] . ".php";
$name = $_REQUEST['title'];
$review = $_REQUEST['review'];
$animeType = $_REQUEST['animeType'];
$date = $_REQUEST['date'];
$yourName = $_REQUEST['yourName'];
$numberEpisodes = $_REQUEST['numberEpisodes'];
$interestingFacts = $_REQUEST['interestingFacts'];
$content = "<font size=\"-2\" face=\"Verdana\">Anime Name: " . $name . "<br>Date Reviewed: " . $date . "<br>Reviewed By: " . $yourName . "<br><br><b>Anime Information</b><br>Anime Type: " . $animeType . "<br>Number of Episodes: " . $numberEpisodes . "<br>Interesting Facts: " . $interestingFacts . "<br><br>" . $review . "</font>";
$fp = fopen($fileName, 'W');
if(!($fp)) {
echo "Could not create file!";
} else {
if(!(fwrite($fp, $content))) {
echo "Could not write to file $name";
} else {
echo "Content added to <a href=\"$filename\">$name</a>";
fclose($fp);
}
}
?>