dongmei2002
dongmei2002
2011-09-07 08:02

关于php和dreamweaver的问题?

已采纳

I have apache, mysql, php installed manually on windows xp.

How can I make my dreamweaver configurable for php (so it can run php)..

I add this line:

<?php print "hello world"; ?>

But nothing appears

UPDATE: I clicked on my site:

Site---->Manage Site-->Edit Servers---->+ Server Folder:D:\Apache2.2\htdocs Web URL: http://localhost:8080/

Now when I close this and add a new php file,, the php file works..but when I write the code in a regular html file like this:

<?php print "hello world"; ?>

The address looks like this: http://localhost:8080/index.html

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • doucheng1944 doucheng1944 10年前

    This is how on CS5:

    1. Click Site(in toolbar).
    2. Click New Site.
    3. Select the Servers tab and select the new server cross +
    4. Select the Connect using: option box and choose Local/Network.
    5. Select Server Folder: as the root to your htdocs. e.g:C:\xampp\htdocs and the Web URL: as http://localhost
    6. Click Save.

    Adding a new file to the project:

    In the Business catalyst panel(to the bottom right), Right click the connection - New file. Rename it extension .php and your good to go.

    UPDATE: PHP will not purse PHP in .html files by default.

    Todo this: Create a .htaccess file and place this in it:

    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .htm .html
    

    Hope this helps

    点赞 评论 复制链接分享
  • dousha1831 dousha1831 10年前

    Dreamweaver does not run PHP itself afaik. You need a Webserver that is able to execute PHP scripts (on Windows I recommend XAMPP apachefriends.org for local testing)

    点赞 评论 复制链接分享

相关推荐