HighDots Forums  

Dreamweaver as PHP editor

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Dreamweaver as PHP editor in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Susi_S webforumsuser@macromedia.com
 
Posts: n/a

Default Dreamweaver as PHP editor - 12-01-2003 , 03:48 PM






I'm just getting into PHP, and have found that as a PHP code editor, Dreamweaver works pretty well (with the extension I installed). My question is this, whenever I save a file with the .inc extension, which is a PHP include file, all of the color coding goes away, as does the PHP tab on the tool bar. Is there any way to make Dreamweaver see a .inc file as a PHP file? I looked on all the menus and in the preferences, but I couldn't find an obvious way to do this. Thanks!



Reply With Quote
  #2  
Old   
darrel
 
Posts: n/a

Default Re: Dreamweaver as PHP editor - 12-01-2003 , 03:55 PM






Quote:
Dreamweaver see a .inc file as a PHP file?
The problem is that DW uses the file extension to determine what kind of
code is on the page. .inc doesn't mean anything specific, so DW doesn't know
what type of code you are using.

That said, can't PHP include any file? Could you just name it include.php or
include.html depending on the contents?

-Darrel




Reply With Quote
  #3  
Old   
Massimo Foti
 
Posts: n/a

Default Re: Dreamweaver as PHP editor - 12-01-2003 , 03:59 PM



http://www.macromedia.com/support/dr...add_ext_mx.htm


--
----------------------------
Massimo Foti
http://www.massimocorner.com
----------------------------




Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Dreamweaver as PHP editor - 12-01-2003 , 04:15 PM



Susi_S webforumsuser wrote:

Quote:
Is there any way to make Dreamweaver see a .inc file as a PHP file?
The easy way: Name your files *.inc.php. With this double extension you
know that the files are includes and any other program knows that the
files contain PHP-code.

Micha


Reply With Quote
  #5  
Old   
Gary White
 
Posts: n/a

Default Re: Dreamweaver as PHP editor - 12-01-2003 , 05:24 PM



On Mon, 01 Dec 2003 22:15:08 +0100, Michael Fesser <netizen (AT) gmx (DOT) net>
wrote:

Quote:
The easy way: Name your files *.inc.php. With this double extension you
know that the files are includes and any other program knows that the
files contain PHP-code.

And any PHP code in the file will be executed before the content is
sent to a browser, thereby protecting any user name or passwords that
might be contained in the file.


Gary


Reply With Quote
  #6  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Dreamweaver as PHP editor - 12-01-2003 , 05:59 PM



Gary White wrote:

Quote:
And any PHP code in the file will be executed before the content is
sent to a browser, thereby protecting any user name or passwords that
might be contained in the file.
True, but such situations can be avoided with storing the PHP-includes
and config-files outside the document root (making them not accessible
via HTTP). Even if the webserver is misconfigured and returns the files
unparsed only the include-statements in the pages will be returned, but
not the included files with the critical code.

Micha


Reply With Quote
  #7  
Old   
Gary White
 
Posts: n/a

Default Re: Dreamweaver as PHP editor - 12-01-2003 , 06:49 PM



On Mon, 01 Dec 2003 23:59:39 +0100, Michael Fesser <netizen (AT) gmx (DOT) net>
wrote:

Quote:
True, but such situations can be avoided with storing the PHP-includes
and config-files outside the document root (making them not accessible
via HTTP). Even if the webserver is misconfigured and returns the files
unparsed only the include-statements in the pages will be returned, but
not the included files with the critical code.
True.


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.