上传 Coldfusion 网站
所以,我创建了一个网站;使用 Mysql 5、Coldfusion 8 和 Dreamweaver CS3。我有一个“GoDaddy”Windows 托管计划 - 并且刚刚上传了我的数据库。我已经上传了我的网站 - 但它不起作用!我有一个index.cfm 页面,所以它应该可以工作,我的URL 是正确的。我不知道为什么那不起作用!
另外,如果我需要在 Application.cfc 页面中放置一些代码来将我的网站连接到 godaddy 上的数据库,我会很受伤,例如:
DRIVER={MySQL ODBC 3.51 Driver};服务器=bridgettips.db.5452582.hostedresource.com;端口=3306;数据库=bridgetips; USER=bridgetips;密码='invu4uraqT';选项=0;
或者我是否需要在“服务器”和“端口”框中添加一些内容 - 目前在 Coldfusion 中,它是服务器 - 本地主机端口 - 3306。
另外,现在保存页面和编辑记录集存在问题 - 它说它需要“冷 Fusion 数据源”。我认为这可能是因为在 Dreamweaver 中将 localhost:8500 更改为我的 URL....? (您认为这就是它不再起作用的原因吗?)
抱歉有这么多问题!只是我的住房计划已经制定了大约 10 天,而且花费了我很多钱!我需要让它尽快工作!
感谢您的任何帮助......
So, I've created a site; using Mysql 5, Coldfusion 8 and Dreamweaver CS3. I have a 'GoDaddy' windows hosting plan - and have just uploaded my database. I have uploaded my site - But it doesn't work! I have an index.cfm page, so it should work, my URL's are correct. I'm not sure why thats not working!!
Also, I am woundering if I need to put some code in my Application.cfc page that connects my site to my database on godaddy, as example:
DRIVER={MySQL ODBC 3.51 Driver}; SERVER=bridgettips.db.5452582.hostedresource.com; PORT=3306; DATABASE=bridgettips; USER=bridgettips; PASSWORD='invu4uraqT'; OPTION=0;
Or do I need to put something in my 'server' and 'Port' box - it is Server - localhost Port - 3306 at present, in Coldfusion.
Also, there is a problem with saving my pages and editing recordsets now - it says that it requires a 'cold Fusion data source'. I think this may be becasue in dreamweaver is changed localhost:8500 to my URL....? (Do you think this is why it no longer works?)
Sorry about so many qustions! It's only that I have had my hosing plan for about 10 days now - and its costing me a lot! I need to have it working asap!
Thanks for any help at all....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Steven,
我尝试过使用GoDaddy作为CF主机,但个人不推荐他们。在我看来,他们没有资格尝试举办CF。
我可以推荐我使用的另一台主机,但我不确定在这里命名是否合适。 (也许其他人可以插话并教育我这一点?)
至于您的数据源问题 - 您很可能需要让 GoDaddy 知道您需要 DSN - 现在他们可能有办法让您自己执行此操作,但有时它是必须为您进行设置的提供商。
另外,请记住,当您在托管环境中时,您需要创建本地的任何映射,并且如果您使用 cffile 等的任何路径,它们在主机上将与本地不同。
您可以为此在 application.cfc 中设置一些变量,以根据 IP 地址进行切换。如果您需要一些帮助,请告诉我,我很乐意为您发布一些代码示例。
Steven,
I have tried to use GoDaddy as a CF host, and personally cannot recommend them. In my opinion, they have no business trying to host CF.
I can recommend another host which I use, but I'm not sure it's proper to name it here. (Perhaps someone else can chime in and educate me on this?)
As for your Datasource issue - you most likely need to let GoDaddy know that you need a DSN - now they may have a way for you to do that yourself, but sometimes it's the provider who must set that up for you.
Also, keep in mind that when you are in the hosted environment, you'll need to create any mappings you have locally, and if you are using any paths for cffile and the like, they will be different on the host than locally.
You can set up some variables in application.cfc for that, to switch based on the IP address. Let me know if you need some help with that and I'll be happy to post some code samples for you.
您需要为数据源创建 DSN 才能使其正常工作。在 GoDaddy 主机控制面板中,“数据库”下拉菜单下有一个 DSN 选项。创建 DSN 后,只需在查询的“数据源”属性中使用 DSN 的名称即可开始操作。这应该可以解决您遇到的两个问题。
You will need to create a DSN for your datasource in order to get it to work. In the GoDaddy Hosting Control Panel there is a DSN option under the "Databases" pull-down menu. Once you've got the DSN created, just use the name of the DSN in the "datasource" attribute of your queries and you should be good to go. That should solve both of the issues that you're having.