I have a little function in my script that used to work until a little while
back and for some reason it has decided to act up.. It is a basic function that
reads a number from a file and then processes it, but increments it by 1,
writes it back to the file and closes it.. now it used to work ok, but somehow,

The function looks something along the lines of..

     $filename ='/path/to/my/file/filet';
     $fd = fopen( $filename,"r");
     $prev_ord_id = fread ($fd, filesize ($filename));
     $order_id = $prev_ord_id+1;
     fclose( $fd );
     $ord_id = "BW" . $order_id;
     $fp = fopen( $filename,"w+");
     fwrite( $fp, $order_id, 26);
     fclose( $fp );

The version of PHP on the server is:- 4.0.4pl1 and it sits on a RedHat Linux
7.1 server..

I know there were some questions about file related functions in one of the
versions of PHP but since this was working fine until now, I dont know..?

"Wise men talk because they have something to say; fools talk
because they have to say something." - Plato

Ashwin Kutty
Systems Administrator
Dalhousie University Libraries
(902) 494-2694

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to