2 replies
The code below displays: domain.com/ but I would like to display just domain.com without the /

<?php $hostname = $_SERVER['SERVER_NAME']; $hostname = str_replace('www.', '', $hostname); echo $hostname . htmlentities($_SERVER['REQUEST_URI']);?>
Also how would I display domain.com in all uppercase letters; DOMAIN.COM

Thanks in advance!
  • Profile picture of the author buncoh
    <?php

    $hostname = $_SERVER['SERVER_NAME'];
    $hostname = str_replace('www.', '', $hostname);
    echo strtoupper($hostname);

    ?>

    just remove ". htmlentities($_SERVER['REQUEST_URI']);",
    use strtoupper function to convert all case to uppercase and echo it
    just like this echo strtoupper($hostname);.
    Signature

    I got nothing to do with my signature.

    {{ DiscussionBoard.errors[8467675].message }}
  • Profile picture of the author RobinInTexas
    Originally Posted by Domain Stryker View Post



    Also how would I display domain.com in all uppercase letters; DOMAIN.COM

    Why would you want all uppercase in the domain name?
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[8467702].message }}

Trending Topics