Hi all messing about with php , trying to get my head round the basics :
ok I have a file called test.php
with this in it
<?
$ourFileName = "testFile.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
?>
when I run this instead of creating a blank text file called testfile.txt
all it does is repeat the code in the command box window as below
C:\php>php -f c:\php\test\test.php
<?
$ourFileName = "testFile.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
?>
C:\php>
Anyone got a clue as to why it wouldnt create a text file please?