从Drupal 6 到 Drupal 7 文件API的改变(变更)
来源:互联网 发布:windows redmine 迁移 编辑:程序博客网 时间:2024/05/02 00:50
There are three key and pervasive things that happened to the File API between Drupal 6 and Drupal 7:
- Any API that used to take a traditional filepath like "sites/default/files/something.txt" now must take a stream-oriented file path like "public://something.txt" or "private://something.txt".
- Many APIs used to take a string if they were acting on an unmanaged file, or a file object if acting on a managed file. Now those functions have been split out, so we now have file_copy() (which takes a file object) and file_unmanaged_copy() (which takes a stream-oriented filepath like "public://example.txt").
- file_create_path() and file_check_directory() were merged into file_prepare_directory().
- A smaller item: drupal_realpath() must be used in place of realpath().
Summary of managed/unmanaged File API changes
- 从Drupal 6 到 Drupal 7 文件API的改变(变更)
- 从Drupal转换到Yii的理由
- 升级drupal 核心(drupal 6/7)
- Drupal上把phpExcel生成的Excel文件保存到Drupal文件系统
- Drupal 通过API动态的添加样式文件
- drupal 7 的RSS
- drupal
- drupal
- drupal
- Drupal
- Drupal
- drupal
- Drupal 从本地迁移到服务器
- Drupal 7 API 之db_select的一些使用
- 通过drupal的API添加样式表
- Drupal batch api的应用之一
- Drupal API - t()
- Drupal Form API
- 九种常用排序的性能分析总结
- Cocos2d-x学习(七):cocos2d-x中ScrollView的简单实现
- 计算程序跑了多长时间
- Cocos2d-x学习(八):cocos2d-x 2.0 中CCListView的用法
- Cocos2d-x学习(九):cocos2d-x 无限背景滚动
- 从Drupal 6 到 Drupal 7 文件API的改变(变更)
- Cocos2d-x学习(十):cocos2d-x 2.0版本中CCScrollView的用法
- 如何在android3.2以上版本中控制横竖屏切换
- Cocos2d-x学习(十一):用cocos2d-x实现MoonWarriors(游戏场景切换和主菜单实现)
- Cocos2d-x学习(十二):用cocos2d-x实现MoonWarriors(无限背景滚动的简单实现)
- socket通过多网卡收发数据
- 向sqlite数据库插入和读取图片数据 (for ios)
- Linux包管理系统
- Cocos2d-x学习(十三):用cocos2d-x实现MoonWarriors(使用触屏改变飞船位置)