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

Adding to an Int row in db
Hi, i have a database which houses all of the users of my site. One of the columns is for points whi

Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

Socket programming
Hello all,

I have a PHP socket script. GPS trackers connect to this socket. IMEI verification

utl_file open error
i have file in the unix path

Path /popdev01/pop/popdevb/tfi/

File name

that old Malformed Headers problem again!!!!! HELP!!!!!!
I've read the http://www.phpfreaks.com/forums/index.php/topic,37442.0.html

I don't think my c

Quick variable question
hey guys/gals,
im trying to write a php script and it works fine as i have it, but i need to set

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a

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