如何在Dreamweaver中设置PHP测试服务器? [英] How to Set up PHP Test Server in Dreamweaver?

查看:351
本文介绍了如何在Dreamweaver中设置PHP测试服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图设置一个PHP服务器,以便除了可以在浏览器中进行预览而不必每次都通过FTP应用程序上传.php文件之外,还可以使用Dreamweaver中的实时"功能.我想进行快速的小型预览时效率不高.

我已经建立了一个新网站,并在本地驱动器上为该网站选择了一个文件夹.

对于服务器,我有以下信息(我不知道其中有多少相关信息):

  • 远程:是
  • 测试:是
  • 服务器名称:服务器
  • 使用以下方式连接:FTP
  • FTP地址:我的域名
  • 用户名:我的用户名
  • 密码:我的密码
  • 端口:21
  • 根目录:空白
  • 使用被动FTP:是
  • 使用IPV6传输模式:否
  • 使用代理:否
  • 使用FTP性能优化:是
  • 维护同步信息:是
  • 保存时自动将文件上传到服务器:是
  • 启用文件检出:否
  • 服务器模型:PHP MySQL

当我测试服务器时,它成功了,并且能够使站点/服务器显示在管理站点"中.但是,当我想在实时"预览面板上或在Chrome浏览器中预览我的.php文件时,收到错误消息:无法解析与动态相关的文件,因为该服务器的网站定义不正确."当我将.php文件手动上传到FTP时,页面会正确显示,但是当我尝试执行此操作时,它要么不起作用,要么Chrome预览模式仅吐出整个原始代码.

我尝试并搜索了Google,但是找不到解决此问题的方法.任何帮助将不胜感激.

侧面说明::我从GoDaddy获得托管,并且该服务器基于MySQL.

谢谢.

解决方案

要使用Dreamweaver设置PHP服务器,请执行以下步骤

第1步.

确保已安装MAMA(对于MAC OX)或WAMP(Window OS).如果您不知道去哪里,请单击此链接 http://www.mamp.info/en/downloads/并安装在您的系统中. (确保您使用的是Skype,因为Skype和Mamp使用相同的端口,所以请关闭它.稍后您可以为Skype填充端口)

第2步:

打开Dreamweaver并选择

Site >  New Site

第3步:

键入您的站点名称,然后单击浏览按钮以找到htdocs文件夹(该文件夹通常位于根目录下的mamp/wamp文件夹内).

第4步:

从左侧选择服务器,然后单击添加(+)符号.

请遵循以下内容:

Server Name: localhost
Connect Using: Local/Network
Server Folder: (this is wehre your site located (i.e. inside htdocs folder)
Web URL: http://localhost/yourSiteName (yourSiteName is name of your folder)
Click Save.

第5步:

检查测试,然后单击保存

第6步:

最后但并非最不重要的打开文件面板

Window > Files 

现在创建一个新文件并将其保存在您的文件夹中.

就这样,你已经成为伴侣了.

希望那可以帮助 干杯!

I am trying to setup a PHP server so that I could use the "Live" feature in Dreamweaver, in addition to being able to preview in my browser without having to upload the .php file via an FTP application every time, which is not efficient when I want to do quick small previews.

I have setup a new website and selected a folder for the site on my local drive.

For the server, I have the following information (I don't know how much of it is relevant):

  • Remote: Yes
  • Test: Yes
  • Server Name: Server
  • Connect using: FTP
  • FTP Address: my domain name
  • Username: my username
  • Password: my password
  • Port: 21
  • Root directory: blank
  • Use passive FTP: Yes
  • Use IPV6 Transfer Mode: No
  • Use proxy: No
  • Use FTP performance optimization: Yes
  • Maintain Synchronization Information: Yes
  • Automatically upload files to server on save: Yes
  • Enable file checkout: No
  • Server model: PHP MySQL

When I test the server, it is successful and I am able to get the site/server to show up in "Manage Sites". However, when I want to test my .php file on the "Live" preview panel or as a preview in Chrome, I get the error message: "Dynamically-related files could not be resolved because the site definition is not correct for this server." When I upload the .php file to my FTP manually, the page displays properly but when I try doing this it either does not work or the Chrome preview mode just spits out the entire raw code.

I tried and Googled, but I could not find a solution to this problem. Any help would be greatly appreciated.

Side note: I have my hosting from GoDaddy and the server from there is based on MySQL.

Thank you.

解决方案

To set up PHP server with dreamweaver follow the following steps

Step 1.

Make Sure you have MAMA(For MAC OX) or WAMP (Window OS) install. If you dont know where to get then click this link http://www.mamp.info/en/downloads/ and install in you system. (make sure if you are using skype close it because skype and mamp use same port. Later you can chage the port for Skype)

Step 2:

Open Dreamweaver and choose

Site >  New Site

Step 3:

Type your site name and click on browse button to locate you htdocs folder (which is normally inside you mamp/wamp folder on you root directory).

Step 4:

Select Server from left hand side and click on add (+) sign.

Follow the following:

Server Name: localhost
Connect Using: Local/Network
Server Folder: (this is wehre your site located (i.e. inside htdocs folder)
Web URL: http://localhost/yourSiteName (yourSiteName is name of your folder)
Click Save.

Step 5:

Check Testing and click SAVE

Step 6:

Last but not least Open File Panel

Window > Files 

Now create a new file and Save it inside you folder.

Thats it you are set mate.

hope thats helps Cheers!

这篇关于如何在Dreamweaver中设置PHP测试服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆