ส่วนนี้ให้คุณดูโพสต์ทั้งหมดของสมาชิกท่านนี้ (เฉพาะโพสต์ในส่วนที่คุณมีสิทธิ์เข้าถึง)
เมนู แสดงโพสต์อ้างถึงจาก: Naskung ใน 06 พฤษภาคม 2017, 11:33:07ขออภัยที่มาตอบช้านะครับ พอดีงานเยอะครับช่วงนี้
ติดตั้งไม่ผ่านอะครับ
Parse error: syntax error, unexpected 'u485255407' (T_STRING), expecting function (T_FUNCTION) in /home/u485255407/public_html/install/include/Database.php on line 27
<?php
/**
* CSZ CMS
*
* An open source content management system
*
* Copyright (c) 2016, Astian Foundation.
*
* Astian Develop Public License (ADPL)
*
* This Source Code Form is subject to the terms of the Astian Develop Public
* License, v. 1.0. If a copy of the APL was not distributed with this
* file, You can obtain one at http://astian.org/about-ADPL
*
* @author CSKAZA
* @copyright Copyright (c) 2016, Astian Foundation.
* @license http://astian.org/about-ADPL ADPL License
* @link [url]https://www.cszcms.com[/url]
* @since Version 1.0.0
*
*
* Mysql database with MySQLi class - only one connection alowed
*/
class Database{
public $_connection;
// Constructor
public function __construct($dbhost = '', $dbuser = '', $dbpass = '', $dbname = ''){
$this->_connection = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
$this->_connection->set_charset('utf8');
$this->_connection->query("SET collation_connection = utf8_general_ci");
// Error handling
if(mysqli_connect_error()){
trigger_error("Failed to conencto to MySQL: ".mysqli_connect_error(), E_USER_ERROR);
}
}
// Get mysqli connection
public function connectDB(){
return $this->_connection;
}
public function numrow($result){
return $result->num_rows;
}
public function closeDB(){
$this->_connection->close();
}
public function mysqli_multi_query_file($mysqli, $filename){
/* error_reporting(E_ERROR | E_PARSE); */
$sql = file_get_contents($filename);
// remove comments
$sql = preg_replace('#/\*.*?\*/#s', '', $sql);
$sql = preg_replace('/^-- .*[\r\n]*/m', '', $sql);
if(preg_match_all('/^DELIMITER\s+(\S+)$/m', $sql, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)){
$prev = null;
$index = 0;
foreach($matches as $match){
$sqlPart = substr($sql, $index, $match[0][1] - $index);
// move cursor after the delimiter
$index = $match[0][1] + strlen($match[0][0]);
if($prev && $prev[1][0] != ';'){
$sqlPart = explode($prev[1][0], $sqlPart);
foreach($sqlPart as $part){
if(trim($part)){ // no empty queries
$mysqli->query($part);
}
}
}else{
if(trim($sqlPart)){ // no empty queries
$mysqli->multi_query($sqlPart);
while(@$mysqli->next_result()){
;
}
}
}
$prev = $match;
}
// run the sql after the last delimiter
$sqlPart = substr($sql, $index, strlen($sql) - $index);
if($prev && $prev[1][0] != ';'){
$sqlPart = explode($prev[1][0], $sqlPart);
foreach($sqlPart as $part){
if(trim($part)){
$mysqli->query($part);
}
}
}else{
if(trim($sqlPart)){
$mysqli->multi_query($sqlPart);
while(@$mysqli->next_result()){
;
}
}
}
}else{
$mysqli->multi_query($sql);
while(@$mysqli->next_result()){
;
}
}
}
}
class Version{
function __construct() {
define('BASEPATH', 'cszcms');
}
private function getVersionConfig(){
$config = array();
require '../cszcms/config/systemconfig.php';
return $config['csz_version'];
}
private function getReleaseConfig(){
$config = array();
require '../cszcms/config/systemconfig.php';
return $config['csz_release'];
}
public function getVersion(){
$version = '';
if($this->getReleaseConfig() == 'beta'){
$version = $this->getVersionConfig().' Beta';
}else{
$version = $this->getVersionConfig();
}
return $version;
}
public function setTimezone($timezone){
if(!$timezone)
$timezone = 'Asia/Bangkok';
if(function_exists('ini_set')){
ini_set('max_execution_time', 300);
ini_set('date.timezone', $timezone);
}
}
}
อ้างถึงจาก: nahpak ใน 25 เมษายน 2017, 11:40:08
แบบนี้ผมลงไม่ได้ใช่เปล่าครับ
System Checking
PHP 5.3.7 or higher [PASS]
MySQLi Driver [PASS]
cURL Enable [PASS]
PHP GD library Enable [PASS]
Config Write Permission [FAIL]
ci_session Write Permission [FAIL]
Cache Write Permission [FAIL]
DB_Cache Write Permission [FAIL]
อ้างถึงจาก: thaicoffin ใน 04 กุมภาพันธ์ 2017, 09:27:22
ขอบคุณเครับ แต่ผมเข้าหน้า DEMO ไม่ได้ครับ