[PHP] periodic file writing error (fputs)

2004-08-05 Thread Sarah Gray
Hello,

I am having a periodic problem that I cannot duplicate and wonder if
anyone has suggestions.

Once a sale is completed a record is written to a log file on the
server.

$filename = $dir. /. $logType._.$today..txt;
$fp = fopen($filename, a+);
fputs($fp, $logEntryStr);
fclose($fp);

The file is chmoded to 644.

About 3 out of 600 times, the log file is not written to.  The times
of day this happens are not consistent, and as I mentioned, I cannot
duplicate it when testing. I initially thought it was some kind of
error on the server, but I am beginning to think it is in my code.

Has anyone experienced anything like this or have any suggestions for
how to troubleshoot this?

Thanks,

Sarah

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] stripping %20 and other characters from query string

2003-02-06 Thread Sarah Gray
Hello,

Forgive me if this is an obvious question, but I am passing a value (a
string with spaces and quotations) back in a query string
and do not know how to strip the extra characters that have been placed
into it.

For example.
$value = Sarah's Test Page
query string =  mypage.php?value=Sarah\\\'s%20Test%20Page

echo $value = Sarah\\\'s%20Test%20Page

What is the command to strip out these extra space and escape characters
so that when I echo $value it prints out
Sarah's Test Page?

Much Appreciated,

s.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php