CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   Folders being prepended to my URL?! (http://www.codingforums.com/showthread.php?t=274776)

doubledee 09-30-2012 05:18 PM

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...
Quote:

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?? :confused:

Thanks,


Debbie

Fou-Lu 09-30-2012 06:15 PM

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.

doubledee 09-30-2012 06:58 PM

Quote:

Originally Posted by Fou-Lu (Post 1275000)
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


All times are GMT +1. The time now is 12:48 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.