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

newbie question
Hi out thereIm totaly new in this forum and to .net and vb so here is a totaly newbie question.I wan

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

Check something, wait, check again, do something!
Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (

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