Reply to Re: How to call a PHP script by using something like a shortcut

Your name:

Reply:


Posted by Steve on 01/12/06 11:46

> The command 'require' works really great, but it doesn't work with a shared
> .css file.

Because "require" is a PHP command, not an HTML command.

> I've a .css file called 'default.css' also in 'D:\WWW\scripts'. But it
> doesn't get loaded.

> <link rel = "stylesheet" type = "text/css" href =
> "D:\WWW\scripts\default.css">

The href attribute is called from the client browser, which has no idea
where your server's D: drive is.

> If I put 'default.css' into the same directory where my php file with the
> command 'require' is located then it works if I use
> <link rel = "stylesheet" type = "text/css" href = "default.css">

Because the browser can make a legal request for it when it is in the
same folder as the HTML document.

> But I'd like to have my .css files also at a shared place.

Yes, as long as the href attribute tells the browser where to find it.
e.g.

<link rel="stylesheet" type="text/css"
href="http://www.example.com/stylesheets/default.css" />

> Is there also something like a 'require' command for a .css file?

No, but you could use some browser-side javascript to confirm that the
..css document was loaded.

---
Steve

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация