用户
 找回密码
 入住 CI 中国社区
搜索
查看: 17511|回复: 31
收起左侧

[讨论/交流] CodeIgniter2.0 预览版可以下载了(附:新版手册、更改记录)

  [复制链接]
发表于 2010-5-6 21:10:54 | 显示全部楼层 |阅读模式
主要更改内容:

  • 不再支持php4!
  • 移除脚手架
  • 移除插件(不是吧)
  • 添加了一个特殊的类,Driver
  • application文件集移到系统文件夹外部
  • 支持在入口文件index.php添加特殊路由规则。
  • 支持在入口文件index.php添加或覆盖一些设置,来覆盖config,php的设置
  • 添加一个$config['directory_trigger']设置,说明没看懂为什么
  • 添加Package配置,用于设置loader加载类寻找子程序包,具体看手册。也就是把扩展程序打包,包中有自己的model,library,helper。
  • 开发中的代码放在这里:http://bitbucket.org/ellislab/codeigniter
  • 移除旧的验证类

类库:
  • 表格类,现在可以在空单元格显示空字符或者是Null
  • 表格类可以指定某单元格一个Class属性
  • 解析类添加一个方法parse_string() 。
  • 评测器可以显示Http报头和配置信息(config数组变量)。
  • User-Agent 类中添加Chrome and Flock支持
  • 单元测试类添加了一些细节。
  • FTP类添加download() 方法
  • 修改do_xss_clean()返回值
  • 上传类添加了两个方法stripslashes() and trim()使上传类得到标准化的的文件路径信息。


怎样移植程序到2.0框架下?:http://philsturgeon.co.uk/news/2 ... -to-codeigniter-2.0
本地下载 codeigniter-tip.zip (2.12 MB, 下载次数: 441)

详细更改记录:
  • General changes
    • PHP 4 support is deprecated. Features new to 2.0.0 may not support PHP 4, and all legacy features will no longer support PHP 4 as of 2.1.0.
    • Scaffolding, having been deprecated for a number of versions, has been removed.
    • Plugins have been removed, in favor of Helpers. The CAPTCHA plugin has been converted to a Helper and documented. The JavaScript calendar plugin was removed due to the ready availability of great JavaScript calendars, particularly with jQuery.
    • Added new special Library type: Drivers.
    • Moved the application folder outside of the system folder.
    • Added routing overrides to the main index.php file, enabling the normal routing to be overridden on a per "index" file basis.
    • Added the ability to set config values (or override config values) directly from data set in the main index.php file. This allows a single application to be used with multiple front controllers, each having its own config values.
    • Added $config['directory_trigger'] to the config file so that a controller sub-directory can be specified when running _GET strings instead of URI segments.
    • Added ability to set "Package" paths - specific paths where the Loader and Config classes should try to look first for a requested file. This allows distribution of sub-applications with their own libraries, models, config files, etc. in a single "package" directory. See the Loader class documentation for more details.
    • In-development code is now hosted at BitBucket.
    • Removed the deprecated Validation Class.
  • Libraries
    • Added Security library, which now contains the xss_clean function, filename_security function and other security related functions.
      添加安全类,包含xss_clean,filename_security在内的一些安全验证方法;
    • Added CSRF (Cross-site Reference Forgery) protection to the Security library.
      添加跨站攻击防范
    • Added $parse_exec_vars property to Output library.
      输出类添加了一个属性,用于关闭解析{elapsed_time} 和 {memory_usage}这两个标签。
    • Added ability to enable / disable individual sections of the Profiler
      可以单独使用评测器中的某一项或多个。
    • Added a wildcard option $config['allowed_types'] = '*' to the File Uploading Class.
      修改上传类,允许所有文件上传
    • Added an 'object' config variable to the XML-RPC Server library so that one can specify the object to look for requested methods, instead of assuming it is in the $CI superobject.
      加强XML-RPC Server类
    • Added "is_object" into the list of unit tests capable of being run.
    • Table library will generate an empty cell with a blank string, or NULL value.
      表格类,现在可以在空单元格显示空字符或者是Null
    • Added ability to set tag attributes for individual cells in the Table library
      表格类可以指定某单元格一个Class属性
    • Added a parse_string() method to the Parser Class.
      解析类添加一个方法parse_string() 。(手册上好像没有)
    • Added HTTP headers and Config information to the Profiler output.
      评测器可以显示Http报头和配置信息(config数组变量)。
    • Added Chrome and Flock to the list of detectable browsers by browser() in the User Agent Class.
      User-Agent 类中添加Chrome and Flock支持
    • The Unit Test Class now has an optional "notes" field available to it, and allows for discrete display of test result items using $this->unit->set_test_items().
      单元测试类添加了一些细节。
    • Added a $xss_clean class variable to the XMLRPC library, enabling control over the use of the Security library's xss_clean() method.
    • Added a download() method to the FTP library
      FTP类添加download() 方法
    • Changed do_xss_clean() to return FALSE if the uploaded file fails XSS checks.
      修改do_xss_clean()返回值
    • Added stripslashes() and trim()ing of double quotes from $_FILES type value to standardize input in Upload library.
      上传类添加了两个方法stripslashes() and trim()使上传类得到标准化的的文件路径信息。

  • Database
    • Added swap_pre value to database configuration.
    • Added autoinit value to database configuration.
    • Added stricton value to database configuration.
    • Added database_exists() to the Database Utilities Class.
    • Semantic change to db->version() function to allow a list of exceptions for databases with functions to return version string instead of specially formed SQL queries. Currently this list only includes Oracle and SQLite.
    • Fixed a bug where driver specific table identifier protection could lead to malformed queries in the field_data() functions.
    • Fixed a bug where an undefined class variable was referenced in database drivers.
  • Helpers
    • Added convert_accented_characters() function to text helper.
    • Added accept-charset to the list of inserted attributes of form_open() in the Form Helper.
    • Deprecated the dohash() function in favour of do_hash() for naming consistency.
    • Non-backwards compatible change made to get_dir_file_info() in the File Helper. No longer recurses by default so as to encourage responsible use (this function can cause server performance issues when used without caution).
    • Modified the second parameter of directory_map() in the Directory Helper to accept an integer to specify recursion depth.
    • Modified delete_files() in the File Helper to return FALSE on failure.
    • Added an optional second parameter to byte_format() in the Number Helper to allow for decimal precision.
    • Added alpha, and sha1 string types to random_string() in the String Helper.
    • Modified prep_url() so as to not prepend http:// if the supplied string already has a scheme.
    • Modified get_file_info in the file helper, changing filectime() to filemtime() for dates.
    • Modified smiley_js() to add optional third parameter to return only the javascript with no script tags.
  • Other Changes
    • Updated loader to automatically apply the sub-class prefix as an option when loading classes. Class names can be prefixed with the standard "CI_" or the same prefix as the subclass prefix, or no prefix at all.
    • Increased randomness with is_really_writable() to avoid file collisions when hundreds or thousands of requests occur at once.
    • Switched some DIR_WRITE_MODE constant uses to FILE_WRITE_MODE where files and not directories are being operated on.
    • get_mime_by_extension() is now case insensitive.
    • Added "default" to the list Reserved Names.
    • Added 'application/x-msdownload' for .exe files and ''application/x-gzip-compressed' for .tgz files to config/mimes.php.
    • Updated the output library to no longer compress output or send content-length headers if the server runs with zlib.output_compression enabled.
    • Eliminated a call to is_really_writable() on each request unless it is really needed (Output caching)
    • Documented append_output() in the Output Class.
    • Documented a second argument in the decode() function for the Encryption Class.
    • Documented db->close().
    • Moved _remove_invisible_characters() function from the Security Library to common functions.

评分

参与人数 1威望 +5 收起 理由
Hex + 5 头条报道

查看全部评分

发表于 2010-5-6 22:05:35 | 显示全部楼层
真的是2.0吗???有的下载吗????
 楼主| 发表于 2010-5-6 22:12:27 | 显示全部楼层
回复 5# zhangcjl


    第一行就是地址
发表于 2010-5-6 22:23:24 | 显示全部楼层
官方否?
发表于 2010-5-6 22:26:04 | 显示全部楼层
有changelog吗?看下先
发表于 2010-5-6 23:46:51 | 显示全部楼层
赞一个!
发表于 2010-5-6 23:53:31 | 显示全部楼层
看一看
发表于 2010-5-6 23:57:53 | 显示全部楼层
这个必须要顶啊!!!
发表于 2010-5-7 00:26:52 | 显示全部楼层
支持下。。
发表于 2010-5-7 09:07:43 | 显示全部楼层
支持php5的高级面向对象特性吗?

本版积分规则