Django Book 翻译
菜单>:
TOC
返回
原文:
If your background is in PHP, youre probably used to putting code under the Web servers document root (in a place such as ``/var/www`` ). With Django, you dont do that. Its not a good idea to put any of this Python code within your Web servers document root, because in doing so you risk the possibility that people will be able to view your code over the Web. Thats not good for security.
翻译:
有过 PHP 编程背景的话,你可能习惯于将代码都放在 Web 服务器的文档根目录 (例如 ``/var/www`` 这样的地方)。而在 Django 中,你不能这样做。把任何 Python 代码放到 Web 服务器的文档根目录中都不是个好主意,因为这样一来,你就要冒着别人透过页面直接看到代码的风险。这对于安全可不是件好事。
备注:
译者: