...

View Full Version : href location in php



lazyserv
11-28-2010, 01:25 AM
hi guys

i wana ask how i use php to call my domain?

example my current coding

<link href="./css/style.css" rel="stylesheet" type="text/css" />

when i view source the result will be the same as above

now i need help how call my domain so that i all my file can be call perfectly

example like wordpress


<link rel="shortcut icon" href="<?php echo get_bloginfo('url') ?>/favicon.ico" />

then the result come out is


<link rel="shortcut icon" href="http://www.example.com/v2/wp-content/themes/arras/images/favicon.ico" />


pls advise how to write the php code i read at php.net but i cant understand :(

poyzn
11-28-2010, 07:54 AM
<link href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/css/style.css" rel="stylesheet" type="text/css" />

lazyserv
11-29-2010, 09:46 AM
thanks problem solve :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum