On Saturday 01 March 2008 00:22:11 Wade Smart wrote:
>02292008 1720 GMT-6

>I must be freakin stupid today because I cant figure this out.
>
> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in 
> /var/www/public/Misc/Beau/SiteRedo/backup.php on line 5
>
><?php
>        ini_set('display_errors', 1);
>        error_reporting(E_ALL); 
>        
>        $file = "dailynoaareport";
>        $newfile = "dailynoaarepot-bk";
>        
>        //$backupLocation = '/backup';
>        
>        if (!copy($file, $newfile)) {
>        echo "failed to copy $file...\n";
>        }
>?>
>
>How is that a constant?
>
>Wade

Hi.

That error usually means that you have a character in your code that shouldn't 
be there and it assumes you should have it between "", so it can't write it 
out. It doesn't understand the character code. Example:
You had something like this:
(fuzzy characters)$file = "dailynoaareport";

It tried to interpet the $ sign with those characters. They should be space-es 
but obviously they wern't. I reorganized the code with my trusty Kate and it 
works fine. You can copy paste the code below, and it should work. It's fuzzy 
character free. :)
And you should look into your text editor for the problem.


<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$file = "dailynoaareport";
$newfile = "dailynoaarepot-bk";
//$backupLocation = '/backup';
if (!copy($file, $newfile)) {
  echo "failed to copy $file...\n";
}
?>

Reply via email to