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

CURL question
i am wondering if it's possible to use multi curl with login something like

login once to web

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

mysql select with $_get ?
Hi, i have this code:
Code: // If char id is 0 and character dont exist do:
if ($_GET["id

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

Estimations and Effort
HI Gurus,

Would like to know whether SAP have a provision for carrying out the Project es

Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place

Socket problem
Hello,

Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.

Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBan

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