rule.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. ),
  87. ),
  88. );