rule.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. return array
  3. (
  4. 'name' => '上传规则',
  5. # 数据结构
  6. 'struct' => array
  7. (
  8. 'name' => array
  9. (
  10. 'name' => '规则名称',
  11. 'type' => 'varchar(24)',
  12. ),
  13. 'save_id' => array
  14. (
  15. 'name' => '存储位置',
  16. 'type' => 'int(11)',
  17. 'default' => '1',
  18. 'value' => 'upload/save',
  19. ),
  20. 'type' => array
  21. (
  22. 'name' => '类型',
  23. 'type' => 'varchar(30)',
  24. 'value' => array
  25. (
  26. 1 => '图片',
  27. 2 => '音频',
  28. 3 => '视频',
  29. 4 => 'office文件',
  30. 5 => 'pdf文件',
  31. 6 => '压缩包',
  32. 7 => '证书',
  33. 8 => '可执行文件',
  34. ),
  35. 'control' => true,
  36. ),
  37. 'chunk' => array
  38. (
  39. 'name' => '分片大小',
  40. 'type' => 'varchar(11)',
  41. 'default' => '5',
  42. ),
  43. 'size' => array
  44. (
  45. 'name' => '限制大小',
  46. 'type' => 'varchar(11)',
  47. 'default' => '2',
  48. ),
  49. 'limit' => array
  50. (
  51. 'name' => '宽高限制',
  52. 'type' => 'tinyint(1)',
  53. 'value' => array
  54. (
  55. 1 => '不限制',
  56. 2 => '高度小于宽度-横图',
  57. 3 => '高度大于宽度-竖图',
  58. ),
  59. 'default' => '1',
  60. ),
  61. 'min_width' => array
  62. (
  63. 'name' => '最小宽度',
  64. 'type' => 'varchar(11)',
  65. 'default' => '0',
  66. ),
  67. 'min_height' => array
  68. (
  69. 'name' => '最小高度',
  70. 'type' => 'varchar(11)',
  71. 'default' => '0',
  72. ),
  73. ),
  74. 'default' => array
  75. (
  76. 'field' => 'id,name,type,cdate',
  77. 'value' => array
  78. (
  79. '1,"图片",1,' . DEVER_TIME,
  80. '2,"音频",2,' . DEVER_TIME,
  81. '3,"视频",3,' . DEVER_TIME,
  82. '4,"office文件",4,' . DEVER_TIME,
  83. '5,"pdf文件",5,' . DEVER_TIME,
  84. '6,"裁剪图片",1,' . DEVER_TIME,
  85. '7,"用户上传图片",1,' . DEVER_TIME,
  86. '8,"文件","1,2,3,4,5",' . DEVER_TIME,
  87. ),
  88. ),
  89. );