• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

File > New > PHP = HTML document?

Explorer ,
Feb 24, 2018 Feb 24, 2018

Copy link to clipboard

Copied

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.

Views

787

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 25, 2018 Feb 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

Votes

Translate

Translate
Community Expert ,
Feb 24, 2018 Feb 24, 2018

Copy link to clipboard

Copied

  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, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 24, 2018 Feb 24, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

perhaps I miss a point... but what you propose Ben doesn't create a blank PHP file... it just create an HTML document using a PHP extension... I'm was thinking that the OP was asking to find a way to create a document containing just

<?php

?>

@SyberKnight am I wrong?...

so if you are looking for that you'll first have to edit the MMDocumentTypes.xml that point to the appropriate document reference for the type you are willing to modify... depending on your OS...

on Windows

C:\Users\YOUR_SESSION\AppData\Roaming\Adobe\Dreamweaver CC Next\fr_FR\Configuration\DocumentTypes

on mac OS

~/Library/Application Support\Adobe\Adobe Dreamweaver CC Next\configuration\DocumentTypes

open the MMDocumentTypes.xml.. then locate the Default.php file... be sure to backup it (just in case)... then replace it by a new document name...i.e NewPHP.php

create a new document and edit the content to fit what you need...

create a new folder called NewDocuments on the same level that the  MMDocumentTypes.xml file ... save the new PHP file as NewPHP.php

relaunch DW create a new PHP file and here you will be

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

you wont need any Stack to make it work.. the stack will only help you to visualize the drawing page...and the database connection... the only problem that you will face... at least that is the one that I face everytime is that on each new DW install, I have to redo it... it doesn't sync on the cloud

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2018 Feb 26, 2018

Copy link to clipboard

Copied

@B i r n o u

you are not wrong - that is exactly what i meant. thank you.

and thank you for your workaround, but i think doing that is more trouble than it's work "for me", since the changes don't remain after updates & such. it'll just be quicker to just select-all-delete-<?php etc.

@Nancy OShea

thank you for that clarification.

seems to me it wouldn't be that much trouble for Adobe to cater to both an HTML version & PHP version by just having more than one template in the New Document dialog to choose from. oh well. ✌ 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2018 Feb 26, 2018

Copy link to clipboard

Copied

LATEST

in fact the changes don't remain only on big update (I mean form major version) not in between small update... but that could be part of the wish list to ask folks @obe to add suche a features to be sync in the cloud...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

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 & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2018 Feb 25, 2018

Copy link to clipboard

Copied

nope I was refering to a debate on the macromedia's forum... it was DW5 that never saw day light, just after Drumbeat was aquire and integrate into DW

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines