adamriley Posted May 11, 2010 Share Posted May 11, 2010 Hi could some one tell me why i get this error if you need the code please ask Warning: fopen(Blocked.txt) [function.fopen]: failed to open stream: No error in C:\xampp\htdocs\Game\submit.php on line 43 Link to comment https://forums.phpfreaks.com/topic/201396-fopenblockedtxt-functionfopen-failed-to-open-stream/ Share on other sites More sharing options...
kenrbnsn Posted May 11, 2010 Share Posted May 11, 2010 Please post your code between tags Link to comment https://forums.phpfreaks.com/topic/201396-fopenblockedtxt-functionfopen-failed-to-open-stream/#findComment-1056673 Share on other sites More sharing options...
adamriley Posted May 11, 2010 Author Share Posted May 11, 2010 Please post your code between <?php // error_reporting(E_ALL); // echo '<pre>$_GET:' . print_r($_GET,true) . '</pre>'; // echo '<pre>$_SERVER:' . print_r($_SERVER,true) . '</pre>'; // echo $_SERVER['REQUEST_METHOD']; if(function_exists("date_default_timezone_set") and function_exists("date_default_timezone_get")) @date_default_timezone_set(@date_default_timezone_get()); // session_start(); // check to make sure there is a session if(!isset($_SESSION['dir'])){ echo "Please contact webmaster as soon as posible"; die(); } else { } // $Sware_words = <<<Words Fuck Dick Words; $Name = $_POST['Name']; // get the name from the form $Email = $_POST['Email']; // get the email from the form $code = $_POST['Code']; // Get the secrity code $dir = $_SESSION['dir']; // Get who they have picked $file = $_SESSION['dir']; // Get the dir // $Time = date('h.i.s A'); // get the time // $Date = date('l jS \of F Y'); // get the date // // check the name to witheld it from the front person if ($Name = "Pleasae Enter your full name"){ $Name = "**********"; } else { } // // // Check That the name has not got no sware words in it if ($Name = "$Sware_words"){ unset($_SESSION['dir']); // write the normal info into the Blocked list $Blockfile = fopen("Blocked.txt","A+"); fwrite($Blockfile, "\r\n$Name:$Email:$code:$Date:$Time"); die(); } else { } $pfile = fopen("places/$dir.txt","w"); fwrite($pfile, "\r\n$Name:$Email:$code:$Date:$Time"); header('Location: http://localhost/Game/red.php?$dir'); // ?> tags Link to comment https://forums.phpfreaks.com/topic/201396-fopenblockedtxt-functionfopen-failed-to-open-stream/#findComment-1056676 Share on other sites More sharing options...
kenrbnsn Posted May 11, 2010 Share Posted May 11, 2010 The modes used in the fopen function are in lowercase, not uppercase. This could be having an adverse affect. <?php $Blockfile = fopen("Blocked.txt","a+"); ?> Ken Link to comment https://forums.phpfreaks.com/topic/201396-fopenblockedtxt-functionfopen-failed-to-open-stream/#findComment-1056691 Share on other sites More sharing options...
adamriley Posted May 11, 2010 Author Share Posted May 11, 2010 thanks Link to comment https://forums.phpfreaks.com/topic/201396-fopenblockedtxt-functionfopen-failed-to-open-stream/#findComment-1056698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.