douyanjing8287 2012-10-31 14:06
浏览 59
已采纳

Dreamweaver CS5.5和PHP生成的代码

I'm currently using Dreamweaver CS5.5 and I 'd like some information about the PHP code that Dw generates, 'cause I find it a little bit confusing and find it a little bit difficult to understand.

1st. About the Authorization or the login script that dw generates. Do I have to sanitize the given username or encrypt/hash the password before doing the check with the ones that are in database, or Dreamweaver does already this for me? If I have to do it by myself where exactly can I apply my own code?

2nd. When creating a query from the bindings, Dreamweaver also generates a GetSQLValueString function which, to tell the truth, confuses me a lot. If I remove this code completely, and keep only the query( or queries in case i want to have more than one), will this have any effect on the rest functionality of the page? Or what if I put it in a seperate file and inlude it in the pages i want to?

3rd. I've also noticed that creates some folders like _mmServerScripts, _notes in the site. Is it also ok if I delete them from the site, or will have an effect on my code?

And one last thing. When I sometimes type an if statement like this:

<?php if(a_condtition): ?>

<p>Hello</p>

<?php endif; ?>

I get the syntax error highlight. Is this somekind of bug?

  • 写回答

2条回答 默认 最新

  • doufan9805 2012-10-31 14:40
    关注
    1. Dreamweaver assumes that the password is in the database in plain text. It dates back to the days when people habitually made that mistake.

    2. GetSQLValueString is Dreamweaver's simplistic way of cleansing strings to prevent injection attacks. It works pretty well.

    3. The various extra directories that DW makes are partly for versioning and access; and partly for configuring the test environment. Remove them from the live site by filtering them in FTP.

    4. The if statement you show is not recognised as syntactically correct in DW

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。