Jump to content

Recommended Posts

Having a bit of trouble here. Here's what I did so far.

Followed tutorials on how to install Apache 2.2.3 http server, MySQL, and PHP.
Dreamweaver 8 doesn't recognize the php language, and it turns red, like so

[color=red]<?php [/color]

I'm fairly sure I set everything up right. My preferences for MySQL and PHP have been set to apache server 2.2 - maybe this is the wrong one? Any help is appreciated. Thanks!

1. Sorry if this is an idiotic question, just beginning to learn.
2. I searched around and didn't find anything that worked - hence why I started this thread!
Link to comment
https://forums.phpfreaks.com/topic/26203-dreamweaver-8-doesnt-recognise-php-code/
Share on other sites

  • 1 month later...
This is just DW's default colour-coding for PHP Script Block Delimiters in code view. It doesn't mean DW doesn't recognise it.
If Red still alarms you, go to Edit->Preferences->Code Coloring , then click "Edit coloring Scheme" and find "PHP Script Block Delimiter" in the 'Styles for:' list.

Then Change the 'Text Color' option.
is it just the php tags that show up red?

like so:
[color=red]<?php

?>[/color]
If so that doesn't mean PHP is not recognised. That is the code colouring for the PHP tags. Also when you go to create a new file make sure you select PHP Script and not HTML script. If you use HTML people wont recognise PHP.
  • 3 weeks later...
First, PHP tags in DW are red. Forms are orange, functions are blue, variables are black and conditionals are green. You can change the colors in the preferences, but my advice is to leave them alone. It works.

>>Also when you go to create a new file make sure you select PHP Script and not HTML script. If you use HTML people wont recognise PHP.<<

Actually, not true.

When you click create new, and select either "basic" html or "dynamic" php, it will create the same starting page. (I always use the xhtml tranitional DType):

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>[/code]

The only difference is when you go to save it, it defaults to either "untitled-1.html" or "untitled-1.php"

BUT, you can save any existing html page to .php and start adding php code.

So long as you SAVE the file as .php, it doesn't matter.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.