Aliyuntp.php 740 B

1234567891011121314151617181920212223242526
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. class Aliyuntp extends Start_Controller {
  4. public function __construct() {
  5. parent::__construct();
  6. $this->load->library('session');
  7. $this->load->_model("Model_aliyunoss","aliyunoss");
  8. }
  9. //定义方法的调用规则 获取URI第二段值
  10. public function _remap($arg,$arg_array)
  11. {
  12. if($arg == 'get_oss_sign')//添加
  13. {
  14. $this->_get_oss_sign();
  15. }else{
  16. defined('BASEPATH') OR exit('No direct script access allowed');
  17. }
  18. }
  19. private function _get_oss_sign(){
  20. $res = $this->aliyunoss->getOssSign();
  21. echo json_encode($res,JSON_UNESCAPED_UNICODE);
  22. }
  23. }