wordpress框架提取


define('SHORTINIT', true);
require '../wp-load.php';
define('BASEPATH', substr(ABSPATH, 0, -1));

foreach( get_included_files() as $v ){
    $file = str_replace(BASEPATH, __DIR__, $v);
    $dir = dirname($file);
    if( !file_exists($dir) ){
        mkdir($dir, 755, true);
    }
    copy($v, $file);
}