Posted by L C on 03/21/06 00:24
Hello,
I am trying to update a web page we have, not a web person so I apologize in
advance. When I try to use Dreamweaver to work on it I end up going to our
public site. It seems as though the site name is "hardcoded" in a php file.
I have included the code of the pages that call each other - Index.html ->
index.php -> dopage.php. In the dopage.pgp page you will see that
$publicaddress is mapped to our site (site name changed for this posting).
My question is: How do I get around that so I can test my edits without
going to the web?
Thanks
Larry C
Index.html
<META
HTTP-EQUIV="Refresh"
CONTENT="1; URL=index.php">
Index.php
<?php
$menuLookupP = '0';
$menuLookupS = '0';
$pathToRoot = '';
$templateDirectory = $pathToRoot.'templates/';
include('menu/menuConfiguration.php');
$title = $menu[$menuLookupP][$menuLookupS]['name'];
$content = $menu[$menuLookupP][$menuLookupS]['cont'];
$myLiteralLink = $menu[$menuLookupP][$menuLookupS]['link'];
$contentRoot = $contentDir[$menuLookupP];
include($pathToRoot.'php/doPage.php');
?>
dopage.php
<?php
if (isset($_GET["mc"])) $doMakeComments = $_GET["mc"];
if (isset($_GET["bn"])) $doMakeComments = $_GET["bn"];
$publicAddress = 'http://www.publicsite.com/';
include($templateDirectory.'header.php');
print('<base href="'.$publicAddress.$contentRoot.'">');
include($pathToRoot.$content);
print('<base href="'.$publicAddress.'">');
include($templateDirectory.'footer.php');
?>
[Back to original message]
|