fwrite error


Posted on 16th Feb 2014 07:03 pm by admin

Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$errorLog_FilePath = "error_log.txt";
$handle = @fopen($errorLog_FilePath,'a+');
$strError = "hi!";
if(!fwrite($handle, $strError)){ //this is line 5
echo('Cannot write to file');
}
?>
I get:
Parse error: syntax error, unexpected T_VARIABLE on line 5

I can't understand what is wrong with it.

No comments posted yet

Your Answer:

Login to answer
206 Like 25 Dislike
Previous forums Next forums
Other forums

PHP referral database. I would like this form to email the referrer.
Okay, Hello I've been trolling for years. This the first time I've ever asked for php help. Normally

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

PHP and XML image gallery variable issue
I'm trying to display the large image on the same page as the thumbnails, to do that I'm passing a v

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

Question about GD library
I am trying to make an image that shows a random quote from my database.


However I want t

Comparing MySql data and arrays.
I have a mysql table set up like this:
idsubjectbodyuseriddatetimetags1blog subjectblog body111|2

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash