Highlighted

.PHP Coding question

Contributor ,
Oct 02, 2017

Copy link to clipboard

Copied

Created a site using .php in Dreamweaver, on all the pages the header is coded

<?php

include('header.php');

?>

it has navigation links

<a href="./" title="Home">Home</a></li>

                <li><a href="bio.php" title="Bio">Bio</a></li>

in the body of the page there are tables which have links to videos like this************************************************************

<div class="home_item_small div_common"><img width="275" height="150" border="0" class="home_item_img" title="" alt="" src="images/BaihraineStill.png"><br>

        <!--<i>Saturday Night Live</i><br />--><b>BALMAIN</b><br />

        Directed by Pascal Dangin</div>

        </a>

        </div>

I need to have the link with the *************************** changed so when clicking I can link to

<a href="./" title="Home">Home</a></li>

                <li><a href="bio.php" title="Bio">Bio</a>

I'm not a php person. Anyone?

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

Links inside the header.php file need to be relative to the parent page in which the PHP include statement occurs.   If your video pages are in a sub or sub-sub folder off the root, then you will need to use absolute URLS in your header.php file.

<ul>

<li> <a href=" http or https:// yoursite.com /index.php " title="Home">Home</a></li>

<li><a href="http or https:// yoursite.com / bio.php" title="Bio">Bio</a></li>

</ul>

Views

118

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

.PHP Coding question

Contributor ,
Oct 02, 2017

Copy link to clipboard

Copied

Created a site using .php in Dreamweaver, on all the pages the header is coded

<?php

include('header.php');

?>

it has navigation links

<a href="./" title="Home">Home</a></li>

                <li><a href="bio.php" title="Bio">Bio</a></li>

in the body of the page there are tables which have links to videos like this************************************************************

<div class="home_item_small div_common"><img width="275" height="150" border="0" class="home_item_img" title="" alt="" src="images/BaihraineStill.png"><br>

        <!--<i>Saturday Night Live</i><br />--><b>BALMAIN</b><br />

        Directed by Pascal Dangin</div>

        </a>

        </div>

I need to have the link with the *************************** changed so when clicking I can link to

<a href="./" title="Home">Home</a></li>

                <li><a href="bio.php" title="Bio">Bio</a>

I'm not a php person. Anyone?

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

Links inside the header.php file need to be relative to the parent page in which the PHP include statement occurs.   If your video pages are in a sub or sub-sub folder off the root, then you will need to use absolute URLS in your header.php file.

<ul>

<li> <a href=" http or https:// yoursite.com /index.php " title="Home">Home</a></li>

<li><a href="http or https:// yoursite.com / bio.php" title="Bio">Bio</a></li>

</ul>

Views

119

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 02, 2017 0
Adobe Community Professional ,
Oct 02, 2017

Copy link to clipboard

Copied

Links inside the header.php file need to be relative to the parent page in which the PHP include statement occurs.   If your video pages are in a sub or sub-sub folder off the root, then you will need to use absolute URLS in your header.php file.

<ul>

<li> <a href=" http or https:// yoursite.com /index.php " title="Home">Home</a></li>

<li><a href="http or https:// yoursite.com / bio.php" title="Bio">Bio</a></li>

</ul>

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2017 1