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

2003-09-09 Thread Gerardo Rojas
You should not have the same variable name for 2 seperate things. 1 variable is the filename, 2 variable is the File Descriptor. $file = "C:\\inetpub\\wwwroot\\packtracker\\LSE\\".$cr.".txt"; $fd = fopen($file, 'w'); -- Gerardo S. Rojas mailto:[EMAIL PROTECTED] -Original Message- Fr

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

2003-09-09 Thread George Pitcher
Thanks for the pointers guys. The revised code (it works) is: $fp2 = "C:\\inetpub\\wwwroot\\packtracker\\LSE\\".$cr.".txt"; if (!$fp2 = fopen($fp2, 'w')) { print "Cannot open the bloody file ($fp2)"; exit; } if (!fwrite($fp2, $content)) { print "Cannot write to file ($fp2)"; exit;

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

[PHP-WIN] No answers found - Why var and why & ?

2003-09-09 Thread André Cupini
Save all programers! (sorry my "brazilian english") I have a simple doubt, but i´m tired because i not found answers... Why, inside a class, declarare $this variables in a format "var $varname;" before of a constructor? And, please, what intend the "&" signal before functions name? I know the ar

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

2003-09-09 Thread chris . neale
George, In the following line you open file $fp... if (!$fp = fopen($fp2, 'w')) { but then you try to write to file handle $fp2... if (!fwrite($fp2, $content)) { The file name is stored in $fp2 but you've named the handle as $fp. Change the $fp2 to $fp in the above line that might fix it. Mayb

php-windows Digest 9 Sep 2003 14:38:28 -0000 Issue 1903

2003-09-09 Thread php-windows-digest-help
php-windows Digest 9 Sep 2003 14:38:28 - Issue 1903 Topics (messages 21329 through 21332): Re: PDF and FDF 21329 by: Cesar Cordovez Need to call VB from PHP script. Is this hard to do? 21330 by: karen97214.yahoo.com 21331 by: Sek-Mun Wong Problem writing to a file

[PHP-WIN] Problem writing to a file

2003-09-09 Thread George Pitcher
Hi all, I'm having a problem writing to a text file. This is the error message: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Warning: fwrite(): supplied argument is not a valid stream resource in C:\Inetpub\wwwroot\packtracker\lse\pub_req_start2.php on line 276 Cannot write