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条)

报告相同问题?

悬赏问题

  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)
  • ¥20 怎么在stm32门禁成品上增加查询记录功能
  • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面