RE: [PHP] linking with home directory
| From: | Mike Brum | Date: | Wed, 09 Jul 2003 15:49:05 +0000 |
| Subject: | RE: [PHP] linking with home directory | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154576@lists.php.net to get a copy of this message | ||
First, I'd create a simple test to see what the value of
$newDir = $HomeDir."themes/".$ThemeFolder;
print $newDir;
And see what that yields. You might have a problem with your slashes.
I find it extremely useful to have test variables print to the screen
along the way to ensure that each new part of my code is receiving the
correct information. It helps isolate where the problem data or logic
lies. (becomes increasingly useful as you use many functions, classes,
includes or just generally large scripts).
-M
-----Original Message-----
From: mpalermo [mailto:mpalermo@vt.edu]
Sent: Wednesday, July 09, 2003 11:37 AM
To: php-general@lists.php.net
Subject: [PHP] linking with home directory is evaluating to with the
string addition:
// Path to script files (absolute file path)
$HomeDir = "c:/inetpub/wwwroot/MyScript/";
// Name of style folder
$ThemeFolder = "default";
//--- Then later in the page, I link the style sheet like this ---//
echo "
<link rel='stylesheet' type='text/css'
href='".$HomeDir."themes/".$ThemeFolder."/style.css'>
";