Sorry to say it, but that is quite sloppy coding. This highlights why it is
important to give variables meaningful names! In the code below, George has
assigned the location of his file to a pointer, but then over-written it
with the pointer result of fopen.
> $fp2 = "C:\\inetpub\\wwwroot\\packtra
ECTED]
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 11:18 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Problem writing to a file
Thanks for the pointers guys.
The revised code (it works) is:
$fp2 = "C:\\inetpub\\wwwroot\\packtr
"Cannot write to file ($fp2)";
exit;
}
fclose($fp2);
rename($cr.".txt",$cr.".doc");
It may be of use to someone else.
Cheers
George
> -Original Message-
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
> Sent: 9 September 2003
You have these two lines
$fp2 = "C:\\inetpub\\wwwroot\packtracker\\LSE\\".$cr.".txt";
$fp3 = "C:\\inetpub\\wwwroot\packtracker\\LSE\\".$cr.".doc";
Why do you have double slashes on every place but one ? :-)
Luis
- Original Message -
From: "George Pitcher" <[EMAIL PROTECTED]>
To: <[EMAIL