To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Tools > Dreamweaver

Dreamweaver In need of help with Dreamweaver?

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-21-2004, 04:26 PM   #1
sgalmeida
Member
 
Join Date: Dec 2003
Posts: 40
Dreamweaver ans syntax highlight on inc files

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
sgalmeida is offline   Reply With Quote
Old 02-10-2004, 05:36 AM   #2
Avochelm
rebmeM
 
Avochelm's Avatar
 
Join Date: Dec 2003
Location: South Australia
Posts: 68
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.
Avochelm is offline   Reply With Quote
Old 03-25-2004, 07:26 AM   #3
happyme
Senior Member
 
Join Date: Oct 2002
Posts: 118
this was answered a while ago, I had to look it up recently when I upgraded to MX 2004:

http://www.phpbuilder.com/board/show...eadid=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
happyme is offline   Reply With Quote
Old 03-25-2004, 08:10 AM   #4
piersk
Moderator
 
Join Date: Aug 2002
Location: Guildford, UK
Posts: 4,279
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.
piersk is offline   Reply With Quote
Old 03-25-2004, 09:06 AM   #5
Avochelm
rebmeM
 
Avochelm's Avatar
 
Join Date: Dec 2003
Location: South Australia
Posts: 68
Thanks happyme - I found that very helpful.
Avochelm is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:05 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.