Web Hosting Talk







View Full Version : macs havig trouble with my mp3 links


nnormal
11-27-2003, 02:25 PM
hi folks new to the board

i have a question about the way mac browsers or the mac IE does links. my website links to a bunch of mp3 using a stadard a href html tag but for some reason some of my mac using friends cant click on the link. the only thing that i can think of which might be the problem is that i have gotten in the habbit of using single instead of double quotes for elements because php requires double quotes for the echo"bla bla bla with $bla"; statement and when printing html it sucks when i have to escape every double quote. single quote echos in php are treated as a literal so echo 'bla bla bla with $bla'; doesnt work. (sorry probably old hat for you experts). anyhow i'm wondering what the deal is. my site is

neohz.com

(sorry wont let me post a link)

Reptilian Feline
11-28-2003, 06:47 AM
Well... you can use double quotes in HTML as well as do the PHP correct. It's called concatenate (or something similar). I'll give you two examples:

First example using the "have to escape double quotes" approach:
<? php
echo "<a href=\"$page\" target=\"_blank\" alt=\"Some text\">";
?>

The easier way:
<?php
echo '<a href="' .$page. '" target="_blank" alt="Some text">';
?>

Easier to read, isn't it? I use it all the time since someone suggested it. It saves me both time and headaches. It also means I can alsways use double quotes in my HTML.

It's the . (period, dot) that "connects" the parts. It adds the different parts together. Just remember... if you need a space before or after your variable, place it on the right side of the ', or it won't show up.

airnine
11-30-2003, 11:20 AM
have you ever had trouble when using e.g.

<img src='asd.gif' height='100' width='200' />

in html and not

<img src="asd.gif" height="100" width="200" />

I haven't...

is there any reason why one should always go for double quotes?

Airnine

Reptilian Feline
12-01-2003, 03:38 AM
I prefer to follow the standards, so I know that I limit the risk of someone having trouble with my site. It has worked so far :)

Besides... it helps me separate PHP from HTML.

nnormal
12-01-2003, 11:58 AM
I've never had any problem with single quoting the elements but I've only tested my pages on a windows box. The weird thing is that the formatting of the page is correct so all of the elements in tags like img and div must be read correctly. the only thing i could figure is that the mac is somehow passing the a href tag to a media device bacuase it ends in .mp3 and that device doesnt understand the single quote...???

Reptilian Feline
12-02-2003, 03:54 AM
Try it and see what happens. If you go to www.w3.org , all their examples of correct code uses double quotes.

13erla
12-02-2003, 08:56 PM
I'm on Mac and had no problem clicking on your mp3s using apple's explorer "Safari"
however IE 5.2 doesn't work with the mp3 links nor the web links.

hope that helps

Reptilian Feline
12-03-2003, 04:08 AM
13erla - could you try my mp3 links from IE 5.2 on your Mac as well? I'd like to know if they work, or if I have to consider Mac users with IE, and make something special. music.reptilian-feline.net/mp3.php

Knogle
12-03-2003, 05:21 AM
Originally posted by Reptilian Feline
13erla - could you try my mp3 links from IE 5.2 on your Mac as well? I'd like to know if they work, or if I have to consider Mac users with IE, and make something special. music.reptilian-feline.net/mp3.php

Not Found
The requested URL /mp3.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.29 Server at music.reptilian-feline.net Port 80

;)

Reptilian Feline
12-03-2003, 05:43 AM
Sorry... I hadn't changed that one to PHP yet. Forgot about it I guess. Thanks, sanjiv!

OK. Go to music.reptilian-feline.net and click the MP3 link in the menu instead.

nnormal
12-03-2003, 01:56 PM
thanks for yer help folks. guess i'm still in a bit of situation.
i wish icould get my hands on one of these browseres where things are broken...:confused: