Professional Web Applications Themes

[PHP] linking with home directory - PHP Development

[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 ...

  1. #1

    Default 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.

    Matt Matijevich Guest

  2. #2

    Default RE: [PHP] linking with home directory

    The XP and 2000 are two different machines.
    >===== Original Message From Matt Matijevich
    <matijevichalliancetechnologies.net> =====
    >[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 ([url]http://www.php.net/[/url])
    >To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Matt Palermo Guest

  3. #3

    Default 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 <phpcrazyted.com> =====
    >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:mpalermovt.edu]
    >Sent: Wednesday, July 09, 2003 11:37 AM
    >To: [email]php-generallists.php.net[/email]
    >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'>
    >";

    Matt Palermo Guest

  4. #4

    Default 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 <mpalermovt.edu> 07/09/03 10:52AM >>>
    The XP and 2000 are two different machines.


    Matt Matijevich Guest

  5. #5

    Default RE: [PHP] linking with home directory

    I am testing it from the same machine for right now.

    >===== Original Message From Matt Matijevich
    <matijevichalliancetechnologies.net> =====
    >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 <mpalermovt.edu> 07/09/03 10:52AM >>>
    >The XP and 2000 are two different machines.
    >
    >
    >
    >--
    >PHP General Mailing List ([url]http://www.php.net/[/url])
    >To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Matt Palermo Guest

  6. #6

    Default RE: [PHP] linking with home directory

    Maybe you should try to reference it from

    [url]http://localhost/MyScript/default/style.css[/url]

    ?

    -M

    -----Original Message-----
    From: Matt Palermo [mailto:mpalermovt.edu]
    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
    <matijevichalliancetechnologies.net> =====
    >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 <mpalermovt.edu> 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




    Mike Brum Guest

  7. #7

    Default 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 [url]http://www.fusebox.org[/url]. 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" <phpcrazyted.com> wrote in message
    news:018101c34634$7d8d1eb0$8d00a8c0Transient...
    > Maybe you should try to reference it from
    >
    > [url]http://localhost/MyScript/default/style.css[/url]
    >
    > ?
    >
    > -M
    >
    > -----Original Message-----
    > From: Matt Palermo [mailto:mpalermovt.edu]
    > 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
    > <matijevichalliancetechnologies.net> =====
    > >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 <mpalermovt.edu> 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
    >
    >
    >
    >

    Micah Montoy Guest

Similar Threads

  1. linking to page link to top directory
    By bostonrose in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: April 13th, 01:03 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. linking with home directory
    By Mpalermo in forum PHP Development
    Replies: 1
    Last Post: July 9th, 03:49 PM
  5. linking with home directory path
    By Mpalermo in forum PHP Development
    Replies: 1
    Last Post: July 9th, 12:12 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