You are here: Issue with PHP and hard coded site name « All PHP « IT news, forums, messages
Issue with PHP and hard coded site name

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');
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация