[PHP] Re: unset Cookies

2001-10-22 Thread Christian Kuhtz

Michael Thanry wrote:
 
 Hello everyone!
 
 Is there a way to unset or expire a cookie which was not set by my pages?

Overriding an existing cookie with setcookie()and 1 sec expiry should do the
trick.

-- 
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]




[PHP] Re: bug in str_replace() ?

2001-10-21 Thread Christian Kuhtz

Martin Lindhe wrote:
 
 Bug in str_replace(), PHP 4.0.6
 
 $text = hello   world;
 $out = str_replace(  , ,$text);
 echo $out;
 
 Expected output:
 hello world
 
 Actual output:
 hello  world
 
 Of course, this is what happens if str_replace() does replacements on input,
 but not on the soon-to-be output it is working on. Is this to be expected,
 or would it be ok to modify the functionality of str_replace()?

Huh?  It did exactly what you asked to do.  You had three spaces, and you
requested that two be replaced by one.  So, you went from three spaces to two
spaces, as two of the three were combined into one.  I don't understand why
you expected to end up with one space.  Can you elaborate please?

Thanks,
Chris

-- 
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]




[PHP] Re: Download the whole directory

2001-10-21 Thread Christian Kuhtz


No.  You cannot initiate multiple transactions that way (at least not without
considerable glue outside of PHP, such as JavaScript etc to cause the browser
to initiate multiple transactions; but it cannot be done directly from the
server side as the client only asked for one file).  

You could zip or tar the directory up and send it to the client in one file,
one transaction.

Mark Lo wrote:
 
 Hi,
 
 I know I can use the following code to download a single file, but how
 can I download the whole directory by using the following code.  Please
 help.. (I am using PHP  Apache)
 
 ?php
 Header(Content-disposition: attachment; filename=\Quickstep.doc\);
 Header(Content-type: application/download);
 readfile($path/Quickstep.doc');
 ?
 
 Thank you
 
 Mark

-- 
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]




Re: [PHP] Form Question

2001-10-21 Thread Christian Kuhtz

Chip Landwehr wrote:
 
 I can't do that because  the form is to big and there is a limit to how much
 data you can send via the URL bar.  Any other ideas?

Use cookies.

-- 
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]