/**
	 * @param string $path
	 * @param mixed  $chmod
	 * @param mixed  $chown
	 * @param mixed  $chgrp
	 * @return bool
	 */
	public function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) {
		$path = untrailingslashit($path);
		if ( empty($path) )
			return false;

		if ( ! $this->ftp->mkdir($path) )
			return false;
		if ( ! $chmod )
			$chmod = FS_CHMOD_DIR;
		$this->chmod($path, $chmod);
		return true;
	}
Пример #2
0
 public function mkdir($dir)
 {
     return $this->ftp->mkdir($dir) && ($this->ftp->chmod($dir, $this->permDir) || true);
 }
Пример #3
0
        echo '<li class=correct>ตรวจสอบโฟลเดอร์ <strong>' . DATA_FOLDER . '</strong> <i>เรียบร้อย</i></li>';
        ob_flush();
        flush();
    }
    $files = array();
    $files[] = ROOT_PATH . 'bin/config.php';
    $files[] = ROOT_PATH . 'bin/vars.php';
    foreach ($files as $file) {
        if (!is_writeable($file)) {
            $ftp->chmod($file, 0646);
        }
        if (is_writeable($file)) {
            echo '<li class=correct>ไฟล์ <strong>' . str_replace(ROOT_PATH, '', $file) . '</strong> <i>สามารถเขียนได้</i></li>';
        } else {
            $error = true;
            echo '<li class=incorrect>ไฟล์ <strong>' . str_replace(ROOT_PATH, '', $file) . '</strong> <em>ไม่สามารถเขียนได้</em> กรุณาสร้างไฟล์เปล่าๆและปรับ chmod ให้เป็น 755 ด้วยตัวเอง</li>';
        }
    }
    $folders[] = DATA_PATH . 'language/';
    foreach ($folders as $folder) {
        if ($ftp->mkdir($folder, 0755)) {
            echo '<li class=correct>โฟลเดอร์ <strong>' . str_replace(ROOT_PATH, '', $folder) . '</strong> <i>สามารถใช้งานได้</i></li>';
        } else {
            $error = true;
            echo '<li class=incorrect>โฟลเดอร์ <strong>' . str_replace(ROOT_PATH, '', $folder) . '</strong> <em>ไม่สามารถเขียนหรือสร้างได้</em> กรุณาสร้างโฟลเดอร์นี้และปรับ chmod ให้เป็น 755 ด้วยตัวเอง</li>';
        }
    }
    echo '</ol>';
    echo '<p>ถ้าทุกอย่างพร้อมแล้ว...เลือกการดำเนินการที่คุณต้องการต่อไปด้านล่าง</p>';
    echo '<p><a href="index.php?step=3" class=button>ติดตั้งใหม่!</a>&nbsp;&nbsp;<a href="index.php?step=2" class=button>เริ่มการปรับรุ่น!</a></p>';
}