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 javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

PHP5 - Verifying a secure mail is secure
I need to send an e-mail from a form to a external department and because it contains personal custo

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

socket communication between c++/java and sending image
hi,

i have a class in c++ called win32_sockserver which creates socket to java. i am trying

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

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