-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
44 lines (40 loc) · 919 Bytes
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Fuel is a fast, lightweight, community driven PHP 5.4+ framework.
*
* @package Fuel
* @version 1.9-dev
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2019 Fuel Development Team
* @link https://fuelphp.com
*/
namespace Fuel\Tasks;
/**
* Install task
*
* Run this task to set default write permissions and environment stuff
* for your app. This could be expanded in app/tasks for application specific stuff.
*
* @package Fuel
* @version 1.0
* @author Phil Sturgeon
*/
class Install
{
public static function run()
{
$writable_paths = array(APPPATH.'cache', APPPATH.'logs', APPPATH.'tmp', APPPATH.'config');
foreach ($writable_paths as $path)
{
if (@chmod($path, 0777))
{
\Cli::write("\t".'Made writable: '.$path, 'green');
}
else
{
\Cli::write("\t".'Failed to make writable: '.$path, 'red');
}
}
}
}