mirror of
https://git.beihong.wang/wangbeihong/blog-source.git
synced 2026-04-23 15:13:05 +08:00
initial
This commit is contained in:
14
admin/extending.php
Executable file
14
admin/extending.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
include 'common.php';
|
||||
|
||||
$panel = $request->get('panel');
|
||||
$panelTable = $options->panelTable;
|
||||
|
||||
if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) {
|
||||
throw new \Typecho\Plugin\Exception(_t('页面不存在'), 404);
|
||||
}
|
||||
|
||||
[$pluginName, $file] = explode('/', trim($panel, '/'), 2);
|
||||
|
||||
require_once $options->pluginDir($pluginName) . '/' . $file;
|
||||
Reference in New Issue
Block a user