3 Replies Latest reply on Aug 19, 2015 5:22 PM by BenPleysier

    Dreamweaver Apache File Question

    rickh22832352

      I am using a Mac with Dreamweaver and Apache (MAMP) and have my root directory assigned to /Applications/htdocs

       

       

      With an HTML page I am using javascript to write a DIV with the contents provided via an external HTML file.

      I have a file named grad.html stored in a folder called html that is within the htdocs folder

       

       

      The code I am using is something like

       

       

      htmlfile="/html/grad.html";

      document.write('<div class="HoldSelectionHTML">');

      document.write('<iframe src='+htmlfile+' frameborder="0"> </iframe>');

      document.write('</div>');

       

      This works just as I expected displaying the contents of grad.html within the div.  The issue is when I make a change to the contents of the file /Applications/htdocs/grad.html the new file contents are not displayed when executed.  Rather the original contents are displayed.  It appears that Dreamweaver has stored the origianl version of grad.html and even tho I make changes the file I update is ignored.  Does anyone know why this is happending and what I can do about it?

       

      Rick

        • 1. Re: Dreamweaver Apache File Question
          Ben M Adobe Community Professional

          By default, MAMP has caching enabled.  In the settings, under PHP turn off Cache and you should be fine.

          1 person found this helpful
          • 2. Re: Dreamweaver Apache File Question
            rickh22832352 Level 1

            Thank you.  I've followed several write ups on how to do this, including upgrading to the latest MAMP and PHP.  The simple menu to turn PHP caching off didn't work.  I'm still seeing inconsistency in caching of my files and am amazed at the various different approaches required for various versions of PHP.  I continue to try the various approaches associated with PHP.ini file.

            Rick

             

            Sent from my iPhone

            • 3. Re: Dreamweaver Apache File Question
              BenPleysier Adobe Community Professional & MVP

              Not sure where the problem could be, but could the following be the result that you want?

               

              <!doctype html>
              <html>
              <head>
              <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
              <script>
                   $(document).ready(function(){
                           $('#HoldSelectionHTML').load('html/grad.html');
                   });
              </script>
              </head>
              <body>
              <div id="HoldSelectionHTML"> Existing content. </div>
              </body>
              </html>
              
              1 person found this helpful