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
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,057
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Folders being prepended to my URL?!

    I am noticing some strange behavior in the Tooltip regarding the URL that appears.

    Here is some background...

    In MySQL, I have this stored in the "summary" field...
    Code:
    Here are 5 Tips that will help you to know <a href="{url}">When to Hire a Consultant</a>
    In my Article Listing page, I have this PHP in the HTML section...
    PHP Code:
    <?php
        
    // ****************************************
        // Display Article Summaries in Section.    *
        // ****************************************
        
    while (mysqli_stmt_fetch($stmt1)){
            
    // Format Published On.
            
    $publishedOn date('F j, Y'strtotime($publishedOn));

            echo 
    "<div class='articleSummary'>
                    <h3>$heading</h3>
                    <a href=''>$image</a>
                    <div class='date'>Published: $publishedOn</div>
                    $summary
                </div>"
    ;
        }
    ?>
    I am in the process of writing a function that will dynamically insert the proper URL into my Summary versus how I had it before which was it being hard-coded.

    The problem...

    When I hover over the link in the text...
    Here are 5 Tips that will help you to know When to Hire a Consultant
    ...I would just expect to see {url} since I stripped out the actual URL that was there before.

    But instead, when I hover over the link I am seeing this...

    local.debbie/management/{url}

    Why is this happening??

    Is it because my browser is seeing that I am on the page at http://local.debbie/management/ and so it just prepends that to {url} in the Tooltip??

    Thanks,


    Debbie

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    If you don't specify an absolute url, or a url with a starting path from the root, HTML assumes you mean from where you are. So yes, showing {url} appended to your current location is normal.

  • #3
    Senior Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    1,057
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    If you don't specify an absolute url, or a url with a starting path from the root, HTML assumes you mean from where you are. So yes, showing {url} appended to your current location is normal.
    Okay, thanks.


    Debbie


  •  

    Posting Permissions

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