Jump to content


Photo

Dreamweaver and syntax highlight on inc files


  • Please log in to reply
5 replies to this topic

#1 sgalmeida

sgalmeida
  • Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 January 2004 - 01:19 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 on DW(if this is possible)?

Thank you very much

Sérgio

#2 BinaryStar

BinaryStar
  • Staff Alumni
  • Advanced Member
  • 74 posts
  • LocationBethlehem, PA

Posted 22 January 2004 - 06:23 PM

You are going to have to go behind the scenes in your dreamweaver cofiguration files and set it up yourself. DWMX is semi-open source, with a lot of the program run by javascript and XML...open DWMX and go the help section and look up customizing dreamweaver, it is very powerful and fantastic, you can even set it to have people enter a password in order to use the program, if you are fluent with javascript...

anyway you will have to hand-code this option in about 3 or 4 different XML files. One suggestion is before you make changes, make a backup of the original, because if you screw it up, the program will fail...

BS ;)

#3 duncanmaclean

duncanmaclean
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 03 February 2004 - 01:44 AM

Are your .inc files HTML headers for page layout etc?

If they are, simply re-save the .inc file as HTML while you ammend it. Once completed, resave as .inc

Works for me.

Duncan.

#4 BinaryStar

BinaryStar
  • Staff Alumni
  • Advanced Member
  • 74 posts
  • LocationBethlehem, PA

Posted 03 February 2004 - 02:24 AM

I have re-written my backend XML files in my configuration folder to view all inc and other files I see fit as php files. It is really easy to do, you just need to edit the XML files.

BS ;)

#5 dereko

dereko
  • Members
  • Pip
  • Newbie
  • 7 posts
  • LocationIreland

Posted 23 February 2004 - 03:05 AM

You shouldn't name your include files like "file.inc"

try naming them "file.inc.php" .. problem solved. :) no reason why you should name them .inc over .inc.php

Also if you leave your "file.inc" files in the web directory people will be able to view the source by going to www.yoursite.com/file.inc and therefore this is a security issue epesically if you have database username and passwords in there.

If you still want to use the .inc naming convention make sure the include files are in a folder that is not accessable via a browser. Arbritary file paths is not a deterent to a hacker.
[br]Jeebers[br][span style=\'font-size:9pt;line-height:100%\']eBusiness Solutions[/span][br]

"I like dogs.....  Dogs are smart, you never see a dog walk in a human sh*t!"


#6 BinaryStar

BinaryStar
  • Staff Alumni
  • Advanced Member
  • 74 posts
  • LocationBethlehem, PA

Posted 23 February 2004 - 03:45 AM

You can also write a small script in your Apache INF file to forbid access to inc files.

BS ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users