Skip to main content
Known Participant
June 28, 2017
Answered

SSI and PHP

  • June 28, 2017
  • 2 replies
  • 1108 views

been using .php extensions and php includes for years

now looking at using server side includes for 2 reasons: lower server stress and enable dreamweaver display

i.e. in theory SSI will enable the included files to be viewed in the Display panel

unlike with php includes which dont appear all together in Display

Question: Is there any way (in DW) to make al my php includes appear like the SSI includes?

    This topic has been closed for replies.
    Correct answer Jon Fritz

    Yes, with a testing server, you'll see changes made in your css that affect your included html in the parent page.

    Modifying css in an attempt to see the change on the include file itself however, generally won't work. Even if the include had a link to the css file, it still may not actually show the css changes because the include isn't a page, it's just a fragment of a page, and many times won't have enough html for the css selectors to latch onto the way they're written.

    1. Open one of the parent pages that uses the include

    2. Make changes to the css that will affect the include's html

    3. Click the "parent" page to see the changes.

    You don't have to save the changed css file at this point, it should show the new css as soon as you click the parent page. If it doesn't F5 will refresh Live View and show anything that's been modified.

    2 replies

    colbydosAuthor
    Known Participant
    June 28, 2017

    yes i understand, i need to edit the included file not the parent

    but the problem in the past has been editing that include file in CSS Designer since it has no

    since it has no css definitions and all css links are in the parent page

    hence, the CSS Designer panels dont populate with data which means i lose out on all that editing power!

    So... will the Testing Server somehow allow me to use the CSS Designer on those included files?

    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    June 28, 2017

    Yes, with a testing server, you'll see changes made in your css that affect your included html in the parent page.

    Modifying css in an attempt to see the change on the include file itself however, generally won't work. Even if the include had a link to the css file, it still may not actually show the css changes because the include isn't a page, it's just a fragment of a page, and many times won't have enough html for the css selectors to latch onto the way they're written.

    1. Open one of the parent pages that uses the include

    2. Make changes to the css that will affect the include's html

    3. Click the "parent" page to see the changes.

    You don't have to save the changed css file at this point, it should show the new css as soon as you click the parent page. If it doesn't F5 will refresh Live View and show anything that's been modified.

    Nancy OShea
    Community Expert
    Community Expert
    June 28, 2017

    This makes no sense whatsoever.

    been using .php extensions and php includes for years

    now looking at using server side includes for 2 reasons: lower server stress and enable dreamweaver display

    PHP includes = SSI which is short for server-side includes.  

    If you want to see your includes locally, just install & define a local testing server.  Put your site folder in the testing server's default web directory.

    Nancy O'Shea— Product User & Community Expert
    colbydosAuthor
    Known Participant
    June 28, 2017

    Thanks Nancy

    are you saying that it makes no sense to change from php incudes to ssi includes?

    i have MAMP installed on my machine will that do what you are suggesting?

    Legend
    June 28, 2017

    colbydos  wrote

    Thanks Nancy

    are you saying that it makes no sense to change from php incudes to ssi includes?

    Makes zero sense at all.

    colbydos  wrote

    i have MAMP installed on my machine will that do what you are suggesting?

    If you are using php locally then you need to use a local server set up so php files can be parsed, MAMP is an option to do this.