Professional Web Applications Themes

some html basics please - PHP Development

It seems that HTML is LAME, LAME,LAME when it comes to determining local directories. I would like to somehow: put image links relative to a base directory (if a relative URI is given) and have PAGE links relative to the current page (if a relative URI is given) What I seem to be able to do instead, is to: with NO <base href="websitehost/~my_directory/"> in the header hard code the location of the images use relative URI for pages -OR- with NO <base href="websitehost/~my_directory/"> in the header use relative location of the images hard code the URI for pages there seems ...

  1. #1

    Default some html basics please

    It seems that HTML is LAME, LAME,LAME when it comes to determining local
    directories.

    I would like to somehow:

    put image links relative to a base directory (if a relative URI is
    given)
    and have PAGE links relative to the current page (if a relative URI
    is given)

    What I seem to be able to do instead, is to:

    with NO <base href="websitehost/~my_directory/"> in the header
    hard code the location of the images
    use relative URI for pages
    -OR-
    with NO <base href="websitehost/~my_directory/"> in the header
    use relative location of the images
    hard code the URI for pages

    there seems no way to tell the browser to look below the base of the
    site for relative URI for images,
    but do local to the current file relative for other pages.

    And doing '"/someURI" makes the browser go off the site and not the base.

    GRRRRR.

    I can either get my images from a particular place on my site by
    hardcoding the exact UR
    Dennis Gearon Guest

  2. #2

    Default Re: [PHP] some html basics please

    Dennis Gearon wrote:
    > It seems that HTML is LAME, LAME,LAME when it comes to determining
    > local directories.
    This is a PHP list, not an HTML list. What does this have to do with PHP?

    --
    The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
    Leif K-Brooks Guest

  3. #3

    Default Re: some html basics please

    On Fri, 29 Aug 2003 22:19:27 -0500, in message
    <3F5017BF.8020509fireserve.net>, the AI program named "Dennis Gearon"
    <gearondfireserve.net> randomly printed:
    > It seems that HTML is LAME, LAME,LAME when it comes to determining local
    > directories.
    >
    > I would like to somehow:
    >
    > put image links relative to a base directory (if a relative URI is
    > given)
    > and have PAGE links relative to the current page (if a relative URI
    > is given)
    >
    This might be considered off-topic for a PHP newsgroup,
    but it just so happens that this is something that
    you can do with PHP that you can't do with HTML.

    <?php
    error_reporting(E_ALL);

    $imgbase = '/image/skins/default';
    $linkbase = '/shop/client1';

    echo <<<BUGS_BUNNY
    <title> Base Variables Test </title>
    <div class='navbar'>
    <a href='$linkbase/index.html'>
    <img src='$imgbase/home.png' alt='Home'></a>
    <a href='$linkbase/contact.html'>
    <img src='$imgbase/contact.png' alt='Contact'></a>
    <a href='$linkbase/about.html'>
    <img src='$imgbase/about.png' alt='About'></a>
    </div>
    BUGS_BUNNY;

    ?>

    To support different skins, just change $imgbase :-)

    My portion of this message is under the GPL.

    --
    I need a job.

    Gary Petersen Guest

Similar Threads

  1. need basics of FMS
    By Insoft.com in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: March 14th, 08:42 PM
  2. SSL Basics
    By ChrisN in forum ASP.NET Security
    Replies: 0
    Last Post: February 19th, 03:49 AM
  3. 3D basics
    By Mr. E webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 1
    Last Post: September 13th, 09:47 AM
  4. [PHP] some html basics please
    By Dennis Gearon in forum PHP Development
    Replies: 0
    Last Post: August 30th, 04:53 PM
  5. Just the basics please...
    By raoul in forum Adobe Photoshop Elements
    Replies: 38
    Last Post: August 6th, 10:51 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