Click to See Complete Forum and Search --> : [Resolved] Customising Colour Coding in Dreamweaver


Damien B
07-27-2003, 12:39 AM
How can you make it so that .INI files are colour coded as .PHP files? When ever I open an .INI file, it colour codes it like a text document (ie: everything is black). For me, I find colour coding very handy and it's a shame I can't have it for .INI.

Thank you for any suggestions to solve this problem.

Boris Senker
08-06-2003, 05:38 PM
DW colors the code it interprets, see it's Document Types in Preferences/Color Coding. It reads *.ini files as text files, doesn't interpret them so... I think it's all you get.

Damien B
08-07-2003, 10:17 AM
Yeah, I was wondering if I could modify MMDW so that it colour-coded .INI files as PHP.

Thanks anyway!

mzanimephp
08-07-2003, 05:31 PM
Actually you can modify Dreamweaver MX to recognise *.ini files and interpret them as PHP, but the problem is that the php.ini file doesn't really have opening and closing <?php ?> blocks in the first place.

DWMX will look for those inorder to begin the PHP code-coloring.

Damien B
08-08-2003, 01:46 PM
I'll give that a try. By the way, I meant .INC not .INI, but it doesn't really matter.

stolzyboy
08-08-2003, 02:14 PM
are you naming your include files something like

footer.inc

or something like that

if so, i would rethink that, i would do it footer.inc.php

that way if someone goes to your site and go to www.domain.com/footer.inc and you don't have apache interpreting .inc files as php, they will see your php code, and you don't want that

and it will solve your .inc color coding problems

Damien B
08-09-2003, 02:21 AM
Thanks. That's a good idea, but I have no clue about how to use .htaccess. Could somebody point me in the direction of a good content negotiation/.htaccess tutorial? Then I will be able to do this.

stolzyboy
08-09-2003, 10:57 AM
there should be a line this this in your httpd.conf

AddType application/x-httpd-php .php .php3

change it to

AddType application/x-httpd-php .php .php3 .inc

then restart apache and it should work

Damien B
08-09-2003, 11:29 AM
I don't have access to that. I'll ask my host to do it for me. By the way, how do you host your own server from scratch?

stolzyboy
08-09-2003, 01:44 PM
If you don't have a clue how to start, here is my suggestion:

Keep paying your host to do it, it isn't worth the hassle of power backups, DNS Servers (you need two of them if you want to do it the right way), keeping up on patches for all server, etc...

Not worth it, unless you are gonna think about having a hosting business with people to do the work when something wrecks

Damien B
08-09-2003, 02:40 PM
Okay then. I will keep starting a hosting business in the future as a possibility. Like you said, it looks like fun until something goes wrong!

Thanks alot mate for your input. I started a new post under UNIX/Linux about this whole .htaccess thing.