[PHP] File download problem using Netscape 7.x

2003-10-02 Thread Ulrich Hacke
Hello,
I have some files on a website which the user can download (e.g. pdf,
zip...). The files sould not bw displayes but the browser should aks the
user what to do (e.g. save it to disk, open it). My code look like this:

header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=$userfile);
header("Content-Length: ".filesize($userfile));
header("Content-Transfer-Encoding: binary\n");

if($fp = fopen($userfile, "rb") fpassthru($fp);

This works fine in most browsers except Netscape 7.x. Here the file is saved
as "document.pdf.php" instead of "document.pdf". Does anyone know how to fix
this? Any help is appreciated.

Yours, Uli

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



[PHP] Parsing HTML

2001-11-29 Thread Ulrich Hacke

Hi,
I have some HTML including several pseudo tags like


After parsing I have an array $content[$i]["name"] where "name" is the name
of the parameters and $i the Counter of the tag. I'm using a regular
expression to find these tags and explode(" ", $my_tag_line) to geht the
parameters out. How can I achive that parameter values can contains
whitespaces? I suppose I'll need another regex for split(). Any help is
appreciated.

Uli


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




AW: [PHP] How to get week number from date

2001-12-11 Thread Ulrich Hacke


> Actually, this is in PHP 4.1.0 which has just been released...
> 
> ..here's the line from the changelog:
> 
> "Added 'W' flag to date() function to return week number of year 
> using ISO 
> 8601 standard. (Colin)"

If you have an older version you can use this line:

$week_number = strftime("%V", $timestamp);

Yours, Uli

-- 
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] Uploading large files

2001-08-30 Thread Ulrich Hacke

Hi,
i have a form for uploading files to a server. It looks like this:






Whenever I choose a file bigger than about 4 or 5 MB i get an internal
server error. I changed the values for post_max_size, upload_max_file_size
and max_execution_time in php.ini - without any success. Does anyone knows
why?

I am running php 4.0.6 on Win98 SE and Apache 1.3.12

Thanks, Uli


-- 
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] Parsing old .CAL-Files

2001-09-20 Thread Ulrich Hacke

Do you remember the calendar.exe in good'ol Win3.11? I have several
.CAL-Files which I want to convert for using them in somewhat modern
software as my client still uses this oldtimer program. CVS as output would
do the trick. Can anybody help me?

Thanks in advance,
Uli


-- 
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] Uploading files on Win98 SE

2001-02-14 Thread Ulrich Hacke

Hello,
I try to code a script where users can upload files to the server. Whenever
I hit the submit button PHP crashes. I run PHP 3.0.17, Apache 1.3 on a Win98
SE machine. My code looks like this:






Is this a known problem in the Win32 distribution or has anyone some hints?

Best regards,
Uli


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