Skip to main content
SyberKnight
Inspiring
February 24, 2018
Answered

File > New > PHP = HTML document?

  • February 24, 2018
  • 2 replies
  • 1290 views

wondering if i'm being an idiot here, but when i go to the FILE menu & select the NEW option, then NEW DOCUMENT dialog box comes up. when i select PHP in the DOCUMENT TYPE column & click the CREATE button, it creates an HTML file.

the only option in the LAYOUT column is "<none>" and in the far right, under "<No preview>" it says "PHP document" then has a "DocType" dropdown that only has HTML options in it.

i know it's not a huge deal, as i can just SELECT ALL > DELETE & start <? php stuff. but curious if there's a setting or something i'm missing here to have it just give me the <? straight away.

thanks.

FYI: using the latest CC 2018 version.

    This topic has been closed for replies.
    Correct answer Nancy OShea

    SyberKnight  wrote

    when i select PHP in the DOCUMENT TYPE column & click the CREATE button, it creates an HTML file.

    That's normal & expected.   DW assumes your PHP file will contain HTML code.  So it provides you with a complete HTML document to work with.  Depending on what you're building, you can start your PHP code above the <!doctype html>  or within the <body> tag.

    Nancy

    2 replies

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    February 25, 2018

    SyberKnight  wrote

    when i select PHP in the DOCUMENT TYPE column & click the CREATE button, it creates an HTML file.

    That's normal & expected.   DW assumes your PHP file will contain HTML code.  So it provides you with a complete HTML document to work with.  Depending on what you're building, you can start your PHP code above the <!doctype html>  or within the <body> tag.

    Nancy

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    February 25, 2018

    I never thougth that it was normal... since dw early age, I always asked to add a pop up to indicate if the PHP document was a document based on HTML and has to be used with the server behavior (because that was what was expected by folks @Macromedia)... OR to be a pure PHP document for those of us who wish to only refer to PHP and don't need any HTML structure in it...

    but as said SyberNight... we do a CTRL A, then DEL... of change the default document...

    and I think that it is no more expected since SB was removed...

    pziecina
    Legend
    February 25, 2018

    https://forums.adobe.com/people/B+i+r+n+o+u  wrote

    I never thougth that it was normal... since dw early age, I always asked to add a pop up to indicate if the PHP document was a document based on HTML and has to be used with the server behavior (because that was what was expected by folks @Macromedia)... OR to be a pure PHP document for those of us who wish to only refer to PHP and don't need any HTML structure in it...

    I think I remember the idea of making php documents html or pure php being debated here just after the SB's were removed. The debate then (and probably still is) was how many Dw users code php themselves compared to those who use extensions, such as those from dmxzone, (the forum had many more users back then).

    Most users who participated at the time, fell mainly into those who would install the old SB's extension, or the then new extensions from dmxzone, with only a few saying they would hand code their own.

    It's probably still the case of Dw having to decide who it is intending to target as its target user base, as without a php de-bugger and a database panel, Dw is still at best a second rate program for server side development.

    BenPleysier
    Community Expert
    Community Expert
    February 25, 2018
    1. Go to Site -> Manage Sites and choose the Edit buttin (pencil)
    2. Choose Servers on the left hand side
    3. Select your local server and choose Edit (pencil)
    4. Choose the Advanced tab and choose the Server Model.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    SyberKnight
    Inspiring
    February 25, 2018

    ah, thanks for that.

    but i don't have any servers defined in this site yet. am just doing some preliminary work before i get that.

    and as fate would have it, i'm on a new machine & haven't installed any local MAMP or anything yet. so i guess i just have to manage as-is.

    that is odd tho, i would think the new document area would still provide a simple blank php doc for ya.

    thanks.