Copying a file with PHP Command
        Posted  
        
            by Tom
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Tom
        
        
        
        Published on 2010-03-28T14:02:14Z
        Indexed on 
            2010/03/28
            14:13 UTC
        
        
        Read the original article
        Hit count: 167
        
php
Hi, I'm having a problem using the copy function in PHP, what is wrong with it? I get the error; Parse error: syntax error, unexpected T_VARIABLE On the bottom line;
$targetDir = 'file.txt';
$targetDir2 = 'file2.txt';
copy($targetDir, $targetDir2);
Thanks
The entire file is;
<?PHP
$targetDir = 'file.txt';
$targetDir2 = 'file2.txt';
copy($targetDir, $targetDir2);
?>
copy and pasted from the doc.
© Stack Overflow or respective owner