Jump to content

daktau

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

daktau's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, can someone please run this on their system and try and explain why I'm still getting an error on line 5? I have saved the file as ANSI encoded and included it with this post. Can someone explain why if I save the same file with a different encoding it fouls up the php? eg. the server does not interpret the code. Even if I re-save the same file as a file encoding that works it seems to output the file as oriental lettering and does not convert the script. [attachment deleted by admin]
  2. Thanks, I have changed the quotes to single and I'm saving the file as a utf-8 encoded script. I'm still receiving the error:- Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\rob-l\file_reNamerTEST2.php on line 5 I have attached the file this time. I'm fairly sure that my php installation is running ok as this is the first error of this sort I've ever seen. I was also running the script on a Mac with the php that comes with OSX and it still gave the same error. Do you have any more clues? [attachment deleted by admin]
  3. Do you still see no error when running this code in your own environment?
  4. <? $errorLog_FilePath = "error_log.txt"; if($handle = @fopen($errorLog_FilePath,'a+')){ $strError = "hi!"; if(!fwrite($handle, 'hi')){ echo('Cannot write to file'); } } ?> This code produces this error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in filename.php on line 5 I use EditPlus v3.11 to edit php code. It does not add any of it's own stuff into my code.
  5. Are not the semi colons all present?
  6. Hi All, Does anyone know what is causing the error in this 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. thanks a lot, George.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.