Click to See Complete Forum and Search --> : Dreamweaver ans syntax highlight on inc files
sgalmeida
01-21-2004, 04:26 PM
Greetings
I'm using dreamweaver as IDE to PHP and I need to use inc files, but all I can see is black code. The code is hard to understand. How can I turn on the php syntax highlight for inc files (if this is possible)?
Thank you very much
Sérgio
Avochelm
02-10-2004, 05:36 AM
I don't know, but generally i change the filename from foo.inc to foo.inc.php and keep it the same or change it back if i cant.
happyme
03-25-2004, 07:26 AM
this was answered a while ago, I had to look it up recently when I upgraded to MX 2004:
http://www.phpbuilder.com/board/showthread.php?s=&threadid=10224922
basically:
Open c:\Program Files\Macromedia\Dreamweaver MX\Configuration\DocumentTypes\MMDocumentTypes.xml
Look for winfileextension="php,php3" or macfileextension="php,php3" if you're on a mac and simply add inc to the list so you have:
winfileextension="php,php3,inc"
Save it, and restart Dreamweaver and you should be good to go.
make sure you set your preferences so inc files don't start in code view
Julia
piersk
03-25-2004, 08:10 AM
Just thought I should point out that unless set otherwise, most webservers assume .inc files are just text and so will display them as text.
There are two ways that you can combat this:
1. Use another extension. I suggest using .inc.php as someone earlier suggested. This will mean that the webserver will just assume that the inc file is a php and thus treat it as a php file.
2. Ensure (by using a .htaccess file or straight in the httpd.conf or whatever IIS uses) that the server sees .inc files as PHP and runs the code accordingly. The problem here is that if you are running a server that uses more that one type of language (i.e. an IIS server that will use both ASP and PHP files) you will need to set it on a directory basis, whereas if you use .inc.asp or .inc.php, then you will not have this problem.
Just my 2c on this matter.
Avochelm
03-25-2004, 09:06 AM
Thanks happyme - I found that very helpful. :)
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.