RE: [PHP] linking with home directory
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:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 11:37 AM To: [EMAIL PROTECTED] 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' ; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] linking with home directory
[snip] Like I said before, the style sheets load up fine on my Windows XP IIS server, but not the Windows 2000. In order to get it to work on the Windows 2000 IIS server, I have to link the style sheets relative to the folder I am working in, but I want to be able to move certain files into other directories without manually linking each one, so that's why I am linking them from the absolute home directory. [/snip] When you are testing the scripts, are testing them on the same machine that is serving the pages? If you are, does the XP server still link the style sheets correctly if you test the script from a different machine? Just trying to get a little more info. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linking with home directory
The XP and 2000 are two different machines. = Original Message From Matt Matijevich [EMAIL PROTECTED] = [snip] Like I said before, the style sheets load up fine on my Windows XP IIS server, but not the Windows 2000. In order to get it to work on the Windows 2000 IIS server, I have to link the style sheets relative to the folder I am working in, but I want to be able to move certain files into other directories without manually linking each one, so that's why I am linking them from the absolute home directory. [/snip] When you are testing the scripts, are testing them on the same machine that is serving the pages? If you are, does the XP server still link the style sheets correctly if you test the script from a different machine? Just trying to get a little more info. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linking with home directory
I have done that, and it displays the correct location. I don't know what else to do. Is there maybe something in the php.ini file? = Original Message From Mike Brum [EMAIL PROTECTED] = 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:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 11:37 AM To: [EMAIL PROTECTED] 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' ; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linking with home directory
I mean, when you actually call the script on the XP machine, where do you test it at? Do you use a browser that is on the XP machine that is running IIS, or do you do it from a different machine? Matt Palermo [EMAIL PROTECTED] 07/09/03 10:52AM The XP and 2000 are two different machines. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] linking with home directory path
Hello, This is a reply to an e-mail that you wrote on Wed, 9 Jul 2003 at 12:51, lines prefixed by '' were originally written by you. // 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' Doing this will mean that your script will only work correctly when viewed on webserver computer. Remote browsers will not be able to access the style sheet as you are referencing it as a file on your server machine. Is this what you intended? David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linking with home directory
I am testing it from the same machine for right now. = Original Message From Matt Matijevich [EMAIL PROTECTED] = I mean, when you actually call the script on the XP machine, where do you test it at? Do you use a browser that is on the XP machine that is running IIS, or do you do it from a different machine? Matt Palermo [EMAIL PROTECTED] 07/09/03 10:52AM The XP and 2000 are two different machines. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] linking with home directory
Maybe you should try to reference it from http://localhost/MyScript/default/style.css ? -M -Original Message- From: Matt Palermo [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 12:02 PM To: Matt Matijevich; php-general Subject: RE: [PHP] linking with home directory I am testing it from the same machine for right now. = Original Message From Matt Matijevich [EMAIL PROTECTED] = I mean, when you actually call the script on the XP machine, where do you test it at? Do you use a browser that is on the XP machine that is running IIS, or do you do it from a different machine? Matt Palermo [EMAIL PROTECTED] 07/09/03 10:52AM The XP and 2000 are two different machines. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] linking with home directory
You may want to look into the fusebox methodology. It allows for single referencing of a file and its valid on every file throughout the page irregardless of what you add and or take away. More information can be found at http://www.fusebox.org. It was orginially designed for ColdFusion but they have a PHP version as well and the bonus part is that its all free. I've been using it for many years, first with ColdFusion and now with PHP. Good luck. Mike Brum [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Maybe you should try to reference it from http://localhost/MyScript/default/style.css ? -M -Original Message- From: Matt Palermo [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 12:02 PM To: Matt Matijevich; php-general Subject: RE: [PHP] linking with home directory I am testing it from the same machine for right now. = Original Message From Matt Matijevich [EMAIL PROTECTED] = I mean, when you actually call the script on the XP machine, where do you test it at? Do you use a browser that is on the XP machine that is running IIS, or do you do it from a different machine? Matt Palermo [EMAIL PROTECTED] 07/09/03 10:52AM The XP and 2000 are two different machines. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php