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

Generate PDF
Hi guys,

I would like to know if there is a way to generate pdf when clicking on a link. In f

Php Mysql Page Loading Notice
Hi all,

I was wondering if there is a way (Sure there is) of showing a message or an image wh

First root of a number
Hi,

I can't find any function in php to give me the first root of a number.
Is there any

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had

retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

Array becomes unset by itself?
Hi,

I have a bit of experience with PHP but not extensive. It seems I cannot store any items

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