Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default CF Include Problem

    All,

    I'm using CF inludes for my website, and they all have images in them. The
    only way I can get the images to show up in the browser is by hardcoding the
    entire path ([url]http://www.mysite.com/images[/url]....) in the image source code. In the
    past I have used library items and DW always rewrote the code to resolve the
    images paths - I expected this to be the case with the CF inclues as well.

    Am I missing something? Thanks!

    Glenn_Stern Guest

  2. Similar Questions and Discussions

    1. include problem
      i have a page that INCLUDES another page but when the second page is included all the images are not showing. it is because the image url's are...
    2. problem with INCLUDE
      Hi! I have a problem... I did a PHP Script for a counter... and I want the counter to be displayed on an another PHP page... So, I can...
    3. [PHP] Problem with include();
      Hello, It's often said that includes should have relative paths instead of absolute paths. This ensures that your script still works when you move...
    4. Php Include Problem
      I have a few php scripts which perform various database queries. Originally I had them all in the same directory which could be viewed through my...
    5. include virtual problem
      i am using dreamweaver to create an asp page. I have the following code incorporated on the page. :- <!--#include virtual="/includes/meta.asp"...
  3. #2

    Default Re: CF Include Problem

    Hi Glenn,

    When you include a file, the *server* simply drops the contents of the
    include into the calling page. I like to think of it as server-side
    copy/paste :). The best way to get around this is to use root relative
    paths. So if you had an image here:

    [url]http://www.mysite.com/images/myimage.gif[/url]

    You would set up your image inside an include like so:

    <img src="/images/myimage.gif" />

    Then, regardless of where you used the include, it would render correctly.



    --
    Daniel Short

    ColdFusion Shopping Cart: [url]http://www.cartweaver.com/[/url]
    Extensions from DWfaq: [url]http://www.dwfaq.com/store/[/url]
    TMM DW Volunteer: [url]http://www.macromedia.com/go/team[/url]
    Design: [url]http://www.web-shorts.com[/url]
    DW training at Lynda.com: [url]http://dansshorts.com/lynda.cfm[/url]


    "Glenn_Stern" <webforumsuser@macromedia.com> wrote in message
    news:d4au98$7e5$1@forums.macromedia.com...
    > All,
    >
    > I'm using CF inludes for my website, and they all have images in them. The
    > only way I can get the images to show up in the browser is by hardcoding
    > the
    > entire path ([url]http://www.mysite.com/images[/url]....) in the image source code.
    > In the
    > past I have used library items and DW always rewrote the code to resolve
    > the
    > images paths - I expected this to be the case with the CF inclues as well.
    >
    > Am I missing something? Thanks!
    >

    Dan Short - TMM Guest

  4. #3

    Default Re: CF Include Problem

    Thanks! I'll give it a shot.
    Glenn_Stern Guest

Posting Permissions

  • You may not post new threads
  • You may 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