php项目install,public/install.php · 工作项目/SmartWiki - Gitee.com

if(file_exists(__DIR__ . '/install.lock')){

header('location:/');

}

$basePath = substr(__DIR__,0,-6);

@rmdir(__DIR__ . '/temp');

$lists[__DIR__]['read'] = is_readable(__DIR__);

$lists[__DIR__]['write'] = is_writable(__DIR__);

$lists[__DIR__]['executable'] = @mkdir (__DIR__ . '/temp');

@rmdir(__DIR__ . '/temp');

$storagePath = $basePath . 'storage';

@rmdir ($storagePath . '/temp');

$lists[$storagePath]['read'] = is_readable($storagePath);

$lists[$storagePath]['write'] = is_writable($storagePath);

$lists[$storagePath]['executable'] = @mkdir($storagePath . '/temp');

@rmdir ($storagePath . '/temp');

$vendorPath = $basePath .'vendor';

@rmdir($vendorPath.'/temp');

$lists[$vendorPath]['read'] = is_readable($vendorPath);

$lists[$vendorPath]['write'] = is_writable($vendorPath);

$lists[$vendorPath]['executable'] = @mkdir($vendorPath.'/temp');

@rmdir($vendorPath.'/temp');

$cachePath = $basePath . 'bootstrap'. DIRECTORY_SEPARATOR. 'cache' ;

@rmdir($cachePath . '/temp');

$lists[$cachePath]['read'] = is_readable($cachePath);

$lists[$cachePath]['write'] = is_writable($cachePath);

$lists[$cachePath]['executable'] = @mkdir ($cachePath . '/temp');

@rmdir($cachePath . '/temp');

$uploadPath = __DIR__ . DIRECTORY_SEPARATOR .'uploads';

@rmdir($uploadPath . '/temp');

$lists[$uploadPath]['read'] = is_readable($uploadPath);

$lists[$uploadPath]['write'] = is_writable($uploadPath);

$lists[$uploadPath]['executable'] = @mkdir ($uploadPath . '/temp');

@rmdir($uploadPath . '/temp');

$extends['fileinfo'] = extension_loaded('fileinfo');

$extends['gd'] = extension_loaded('gd');

$extends['iconv'] = extension_loaded('iconv');

$extends['json'] = extension_loaded('json');

$extends['mbstring'] = extension_loaded('mbstring');

$extends['pdo'] = extension_loaded('pdo');

$extends['pdo_mysql'] = extension_loaded('pdo_mysql');

$extends['openssl'] = extension_loaded('openssl');

$extends['tokenizer'] = extension_loaded('tokenizer');

$extends['ctype'] = extension_loaded('ctype');

$extends['curl'] = extension_loaded('curl');

if(!file_exists($basePath . '.env') && file_exists($basePath.'.env.example')) {

$env = file_get_contents($basePath.'.env.example');

$env = str_replace('APP_DEBUG=true', 'APP_DEBUG=false', $env);

if(function_exists('openssl_random_pseudo_bytes')) {

$secure = true;

$app_key = 'base64:' . base64_encode(openssl_random_pseudo_bytes(32,$secure));

$env = str_replace('APP_KEY=', 'APP_KEY=' . $app_key, $env);

}

file_put_contents($basePath.'.env', $env);

}

?>

SmartWiki安装

html, body {

height: 100%;

font-family: "Helvetica Neue", Helvetica, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;

}

body {

margin: 0;

padding: 0;

width: 100%;

font-family: 'Lato';

}

.container {

width: 660px;

padding: 15px;

border-radius: 4px 4px 0 0;

margin: 50px auto;

border: 1px solid #ddd;

}

#error-message{

padding-left: 20px;

display: none;

}

SmartWiki安装

×Close

PHP版本 PHP版本必须大于等于5.6
当前PHP版本<?php echo PHP_VERSION;?>

目录权限检测

目录读写执行

<?php foreach ($lists as $path=>$item):?>

<?php echo $path;?><?php echo $item['read']?' [√]' : '[×]' ;?><?php echo $item['write']?' [√]' : '[×]'; ?><?php echo $item['executable']?' [√]' : '[×]'; ?>

PHP扩展检测

扩展名是否安装

<?php foreach ($extends as $name=>$isLoad):?>

<?php echo $name;?><?php echo $isLoad?' [√]' : '[×]' ;?>

下一步

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值