|
|
|
 |

August 14th, 2003, 06:34 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT:Is this the right forum for HTML help?
Well... I am not really a PHP expert, so I am not sure about those header lines. If the syntax is correct, it may be that your install of PHP does not support them or something. My guess would be that they are not really necessary though...
Don't forget to format the page how you want.  The easiest way would be to include a HTML file before and after the echo statements, such as this:
include ("header.html");
These files would just be the portions of the page above and below where the turn file is to be displayed.
|

August 14th, 2003, 06:39 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT:Is this the right forum for HTML help?
It seems to have something with not being allowed to send any information to the browser before the headers, I've removed all text output before the headers but still...
If the headers aren't needed, how to make the browser download the file without the need of clicking any link??
[ August 14, 2003, 05:41: Message edited by: Ruatha ]
|

August 14th, 2003, 06:43 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT:Is this the right forum for HTML help?
There was one space character infront of <?php
that messed all up, now I'm getting somewhere
The only remaining problem is taht it wants to add the extension .php to the file, so the suggested filename in the download dialogue is NGC3_57.zip.php
Hmm, how to remove that??
I had to change the Content-Type header to x-zip-compressed and now it works great.
[ August 14, 2003, 05:57: Message edited by: Ruatha ]
|

August 14th, 2003, 06:51 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT:Is this the right forum for HTML help?
Quote:
If the headers aren't needed, how to make the browser download the file without the need of clicking any link??
|
Oh, I didn't realize that is what you wanted it to do. I have no idea how to do that.
|

August 14th, 2003, 06:54 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT:Is this the right forum for HTML help?
This looks like you are cutting off the file extension, and I see no line to add a new one:
$fname = basename($file);
So that might cause problems. 
|

August 14th, 2003, 07:01 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT:Is this the right forum for HTML help?
Nope, now all is working, it was the content type.
Thanx for the help, I chose your way to find the file instead of mine as if I use yours I can just copy new files into the directory and leave the old ones, but with mine I had to delete the old ones.
So:
http://ruatha.homelinux.org
press "Get latest game turn file" for the script, and here is the script finished:
http://ruatha.homelinux.org/upload.txt
I removed the line
$fname = basename($file);
as it had not use, just a reminder of something previously tested.
[ August 14, 2003, 06:57: Message edited by: Ruatha ]
|

August 14th, 2003, 07:03 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT:Is this the right forum for HTML help?
Cool.  Glad I could help.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|