简体   繁体   English

Dreamweaver CS5.5和PHP生成的代码

[英]Dreamweaver CS5.5 and PHP -generated- code

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. 我目前正在使用Dreamweaver CS5.5,并且希望获得有关Dw生成的PHP代码的一些信息,因为我发现它有些混乱,并且使它难以理解。

1st. 1。 About the Authorization or the login script that dw generates. 关于dw生成的授权或登录脚本。 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? 在对数据库中的用户名进行检查之前,我是否必须清理给定的用户名或加密/哈希密码,或者Dreamweaver已经为我做到了这一点? If I have to do it by myself where exactly can I apply my own code? 如果我必须自己做,那么在哪里可以应用我自己的代码?

2nd. 第2位。 When creating a query from the bindings, Dreamweaver also generates a GetSQLValueString function which, to tell the truth, confuses me a lot. 从绑定创建查询时,Dreamweaver还会生成一个GetSQLValueString函数,说实话,这使我非常困惑。 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. 3。 I've also noticed that creates some folders like _mmServerScripts, _notes in the site. 我还注意到在站点中创建了一些文件夹,例如_mmServerScripts,_notes。 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: 当我有时键入以下if语句时:

<?php if(a_condtition): ?>

<p>Hello</p>

<?php endif; ?>

I get the syntax error highlight. 我得到语法错误突出显示。 Is this somekind of bug? 这是某种错误吗?

<?php if($a_condtition)
{
    echo '<p>Hello</p>';
}?>
  1. Dreamweaver assumes that the password is in the database in plain text. Dreamweaver假定密码以纯文本格式存在于数据库中。 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. GetSQLValueString是Dreamweaver清除字符串以防止注入攻击的简化方法。 It works pretty well. 效果很好。

  3. The various extra directories that DW makes are partly for versioning and access; DW创建的各种额外目录部分用于版本控制和访问。 and partly for configuring the test environment. 部分用于配置测试环境。 Remove them from the live site by filtering them in FTP. 通过使用FTP过滤将它们从实时站点中删除。

  4. The if statement you show is not recognised as syntactically correct in DW 您显示的if语句在DW中在句法上未被识别为正确的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM