Professional Web Applications Themes

linking with home directory path - PHP Development

I have a script that contains style sheets and I can't seem to link it on my Windows 2000 IIS server. It works perfectly fine on my Windows XP IIS server. Here is what I am trying to do. The index.php file (which links to the style sheets) is located in the MyScript folder and inside that folder is another folder called themes (where the style sheets are located). I am doing the following, which works fine on a Windows XP IIS server, but not my Windows 2000. // Path to script files (absolute file path) $HomeDir = "c:/inetpub/wwwroot/MyScript/"; // ...

  1. #1

    Default linking with home directory path

    I have a script that contains style sheets and I can't seem to link it on my
    Windows 2000 IIS server. It works perfectly fine on my Windows XP IIS server.
    Here is what I am trying to do. The index.php file (which links to the style
    sheets) is located in the MyScript folder and inside that folder is another
    folder called themes (where the style sheets are located). I am doing the
    following, which works fine on a Windows XP IIS server, but not my Windows
    2000.


    // 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'>
    ";


    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.

    Is there some setting in the php.ini file that deals with this? If anyone has
    suggestions, please let me know. I assume the above code would work on Linux
    systems without problems (given the correct home directory path). Can anyone
    verify this? Thanks a lot.

    Matt


    Mpalermo Guest

  2. #2

    Default 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 :: [url]http://www.phpmachine.com/[/url]

    Professional Web Development by David Nicholson
    [url]http://www.djnicholson.com/[/url]

    QuizSender.com - How well do your friends actually know you?
    [url]http://www.quizsender.com/[/url]
    (developed entirely in PHP)
    David Nicholson Guest

Similar Threads

  1. Linking to Network Folder path with javascript
    By Macnimation in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: January 13th, 03:17 PM
  2. Verity - linking each directory in URL (ie.likebreadcrumbs)
    By TBJ in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: April 27th, 07:25 PM
  3. [PHP] Linking to files outside the directory structure...?
    By Jabber@Raditha.Com in forum PHP Development
    Replies: 1
    Last Post: August 28th, 10:03 AM
  4. [PHP] linking with home directory
    By Matt Matijevich in forum PHP Development
    Replies: 6
    Last Post: July 9th, 05:31 PM
  5. linking with home directory
    By Mpalermo in forum PHP Development
    Replies: 1
    Last Post: July 9th, 03:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139