Re: [PHP-WIN] Problem writing to a file

2003-09-10 Thread Stephen
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

RE: [PHP-WIN] Problem writing to a file

2003-09-09 Thread Gerardo Rojas
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

RE: [PHP-WIN] Problem writing to a file

2003-09-09 Thread George Pitcher
"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

Re: [PHP-WIN] Problem writing to a file

2003-09-09 Thread Luis Moreira
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