| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,6 +69,10 @@ function __construct($config) | |||
| 69 | 69 | throw new \Exception(__CLASS__.' require base_dir and base_url.'); | |
| 70 | 70 | } | |
| 71 | 71 | $this->base_dir = $config['base_dir']; | |
| 72 | + if (Tool::endchar($this->base_dir) != '/') | ||
| 73 | + { | ||
| 74 | + $this->base_dir .= '/'; | ||
| 75 | + } | ||
| 72 | 76 | $this->base_url = $config['base_url']; | |
| 73 | 77 | $mimes = require LIBPATH . '/data/mimes.php'; | |
| 74 | 78 | $this->mimes = $mimes; | |
@@ -112,7 +116,7 @@ function save($name, $filename = null, $allow = null) | |||
| 112 | 116 | } | |
| 113 | 117 | ||
| 114 | 118 | //文件存储的路径 | |
| 115 | - $base_dir = empty($this->sub_dir) ? $this->base_dir : $this->base_dir . "/" . $this->sub_dir; | ||
| 119 | + $base_dir = empty($this->sub_dir) ? $this->base_dir : $this->base_dir . $this->sub_dir . '/'; | ||
| 116 | 120 | ||
| 117 | 121 | //切分目录 | |
| 118 | 122 | if ($this->shard_type == 'randomkey') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments