How do I get this ti work on all...

User 243515 Photo


Registered User
508 posts

Rhubarb wrote:
billr wrote:
Greg,

I also see, the entire site shifts to the left with IE6 and the menu is vertical.

The menu is inside wrapper2. Have you tried setting wrapper2 to a width:100%; and then see if that helps?

Thanks Bill, I'll try that out. I got some info from Melanie and I'm going to look at that also.

Greg

Well, I tried that and it didn't work as planned. But, all is not lost! I found a surprisingly simple solution:

display: inline;

I put the above line where I load the images and wah-lah!!
The menu now stretches across the page.

Thank you Jim for your help.

Greg
User 243515 Photo


Registered User
508 posts

billr wrote:
Greg,

Here is some code you can try to use.
<?php
$filename = "file.bww";

header("Content-Length: " . filesize($filename));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=file.bww');

readfile($filename);
?>

Save that code as file.php and upload it in the same folder as all your matching file.bww files.

Then in your anchor code you would change the filename to file.php.

Here is an example using your code. Change the code on your page to read:
<td><a href="bprtunes/BasicFive/Amazing Grace.php">Amazing Grace</a></td>

And then have the php code use Amazing Grace.bww for the two file.bww names in the php code, and save the file as Amazing Grace.php

I hope I am explaining this clearly. If you have 20 .bww files, you will end up with 20 .php files that are the links on your page. When someone clicks on Amazing Grace, the link will run Amazing Grace.php and you will get a download window for Amazing Grace.bww

I also suggest that you rename all your .bww files to eliminate spaces. It may work most of the time, but there are times when it does not work properly to use filenames with spaces. Also using all lowercase will help.

Let me know if this works for you.

Hi Bill;

Well, I've been working on this on and off for awhile now and no matter what I have tried I still get the message:
"No input file specified" when I click on the tune title.

I think I've followed your instructions (I've never used PHP). Here is the PHP code:

<?php
$filename = "AmazingGrace.bww";

header("Content-Length: " . filesize($filename));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=AmazingGrace.php');

readfile($filename);
?>

And the web page is here:

http://www.olympiahighlanders.org/ceilidh.html

What am I missing?

Oh, before I forget, if I have 20 tunes to process, are you saying that I will create 20 file.php files or 20 entries in one file.php file?
Greg
User 355448 Photo


Ambassador
3,144 posts

Greg,

This is the way it should look:

<?php
$filename = "AmazingGrace.bww";

header("Content-Length: " . filesize($filename));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=AmazingGrace.bww');

readfile($filename);
?>

Then save that as AmazingGrace.php When someone clicks on the .php link, the .php file willshift everythinbg to your bww file for download. Both cases of the fiile name should be the same inside the .php file.

It is working great for me.
User 243515 Photo


Registered User
508 posts

billr wrote:
Greg,

This is the way it should look:

<?php
$filename = "AmazingGrace.bww";

header("Content-Length: " . filesize($filename));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=AmazingGrace.bww');

readfile($filename);
?>

Then save that as AmazingGrace.php When someone clicks on the .php link, the .php file willshift everythinbg to your bww file for download. Both cases of the fiile name should be the same inside the .php file.

It is working great for me.

I really appreciate your help Bill. And I've followed your instructions closely but, I either missing something or ...

This is my php code:

<?php
$filename = "AmazingGrace.bww";

header("Content-Length: " . filesize($filename));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=AmazingGrace.bww');

readfile($filename);
?>

But, this is what I'm getting now:


Warning: filesize(): Stat failed for AmazingGrace.bww (errno=2 - No such file or directory) in /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php:4) in /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php:4) in /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php:4) in /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php on line 6

Warning: readfile(AmazingGrace.bww): failed to open stream: No such file or directory in /home/content/O/l/y/OlyHighPB/html/bprtunes/BasicFive/AmazingGrace.php on line 8


What the heck did I do now?

Greg
User 355448 Photo


Ambassador
3,144 posts

Greg,

Are you putting the php file in the same directory as the bww file?

I get a 404 error when I try to view the .bww file.
User 243515 Photo


Registered User
508 posts

billr wrote:
Greg,

Are you putting the php file in the same directory as the bww file?

I get a 404 error when I try to view the .bww file.

Hi Bill;

The php file is named AmazingGrace.php and is in

http://www.olympiahighlanders.org/bprtunes/BasicFive/

here is the html tag that points to the file:

<tr>
<td><a href="../bprtunes/BasicFive/AmazingGrace.php">Amazing Grace</a></td>
</td>
</tr>

As you can see, I thought maybe I needed to start back one level but, I got the same errors.

I'm really lost about now.

Greg
User 355448 Photo


Ambassador
3,144 posts

Greg,

Where is the AmazingGrace.bww file?

For this PHP file to work, it must be in the same folder as the .bww file.
User 355448 Photo


Ambassador
3,144 posts

I found a link that works:
http://www.olympiahighlanders.org/bprtu … Dundee.bww

Do not remove that file and create a php file that will have an absolute URL of:
http://www.olympiahighlanders.org/bprtu … Dundee.php and will have content of:

<?php
$filename = "Bonnie%20Dundee.bww";

header("Content-Length: " . filesize($filename));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=Bonnie%20Dundee.bww');

readfile($filename);
?>


You should end up with a folder of .bww files and an equal number of .php files. such that if you do a directory list you will have:

file01.bww
file01.php
file02.bww
file02.php

and so on for every file.
User 243515 Photo


Registered User
508 posts

billr wrote:
Greg,

Where is the AmazingGrace.bww file?

For this PHP file to work, it must be in the same folder as the .bww file.

Hi Bill

Bill, I just found the problem, there was a space between Amazing and Grace and I completely missed it. It works fine now that I know how to spell. So, it was Amazing Grace.bww and not AmazingGrace.bww as in the .php code!

My next step is to remove all the spaces from the .bww files and make sure my spelling is correct!

Thank you very much for your patience.

Greg
User 355448 Photo


Ambassador
3,144 posts

Check the case for the file names.

Personally, I try to use all lower-case and NO spaces. The extension can also be important. AmazingGrace.bww is not the same file as AmazingGrace.BWW and not the same as amazinggrace.bww since browsers and web servers are very literal.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.