Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    127
    Thanks
    9
    Thanked 0 Times in 0 Posts

    href location in php

    hi guys

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

    example my current coding
    Code:
    <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

    PHP Code:
    <link rel="shortcut icon" href="<?php echo get_bloginfo('url'?>/favicon.ico" />
    then the result come out is

    Code:
    <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

  • #2
    Regular Coder poyzn's Avatar
    Join Date
    Nov 2010
    Posts
    266
    Thanks
    2
    Thanked 61 Times in 61 Posts
    PHP Code:
    <link href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/css/style.css" rel="stylesheet" type="text/css" />

  • Users who have thanked poyzn for this post:

    lazyserv (11-29-2010)

  • #3
    Regular Coder
    Join Date
    Jan 2010
    Posts
    127
    Thanks
    9
    Thanked 0 Times in 0 Posts
    thanks problem solve


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •