 |
สอบถามเรื่อง ckfinder ครับ อัพลง serv แล้วหา folders ที่เก็บไฟล์ไม่เจอครับ |
|
 |
|
|
 |
 |
|
ผมทำใน localhost appserv ไม่มีปัญหาครับแต่พออัพลง serv จริง แล้วมีปัญหาดังรูปครับ หา folders ไม่เจอ

config.php
session_start ();
ob_start();
/*
* ### CKFinder : Configuration File - Basic Instructions
*
* In a generic usage case, the following tasks must be done to configure
* CKFinder:
* 1. Check the $baseUrl and $baseDir variables;
* 2. If available, paste your license key in the "LicenseKey" setting;
* 3. Create the CheckAuthentication() function that enables CKFinder for authenticated users;
*
* Other settings may be left with their default values, or used to control
* advanced features of CKFinder.
*/
/**
* This function must check the user session to be sure that he/she is
* authorized to upload and access files in the File Browser.
*
* @return boolean
*/
function CheckAuthentication()
{
if($_SESSION['AUTHEN']=='01' or $_SESSION['AUTHEN']=='04'){
return true;
}
else{
return false;
}
// WARNING : DO NOT simply return "true". By doing so, you are allowing
// "anyone" to upload and list the files in your server. You must implement
// some kind of session validation here. Even something very simple as...
// return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];
// ... where $_SESSION['IsAuthorized'] is set to "true" as soon as the
// user logs in your system. To be able to use session variables don't
// forget to add session_start() at the top of this file.
}
// LicenseKey : Paste your license key here. If left blank, CKFinder will be
// fully functional, in demo mode.
$config['LicenseName'] = '';
$config['LicenseKey'] = '';
/*
Uncomment lines below to enable PHP error reporting and displaying PHP errors.
Do not do this on a production server. Might be helpful when debugging why CKFinder does not work as expected.
*/
// error_reporting(E_ALL);
// ini_set('display_errors', 1);
/*
To make it easy to configure CKFinder, the $baseUrl and $baseDir can be used.
Those are helper variables used later in this config file.
*/
/*
$baseUrl : the base path used to build the final URL for the resources handled
in CKFinder. If empty, the default value (/userfiles/) is used.
Examples:
$baseUrl = 'http://example.com/ckfinder/files/';
$baseUrl = '/userfiles/';
ATTENTION: The trailing slash is required.
*/
$baseUrl = '/health/pics/';
/*
$baseDir : the path to the local directory (in the server) which points to the
above $baseUrl URL. This is the path used by CKFinder to handle the files in
the server. Full write permissions must be granted to this directory.
Examples:
// You may point it to a directory directly:
$baseDir = '/home/login/public_html/ckfinder/files/';
$baseDir = 'C:/SiteDir/CKFinder/userfiles/';
// Or you may let CKFinder discover the path, based on $baseUrl.
// WARNING: resolveUrl() *will not work* if $baseUrl does not start with a slash ("/"),
// for example if $baseDir is set to http://example.com/ckfinder/files/
$baseDir = resolveUrl($baseUrl);
ATTENTION: The trailing slash is required.
*/
$baseDir = resolveUrl($baseUrl);
ขอความกรุณาด้วยครับ
Tag : PHP, MySQL
|
|
 |
 |
 |
 |
Date :
2010-12-12 18:09:23 |
By :
exdo |
View :
2169 |
Reply :
8 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่มีคนตอบเลย รอผู้รู้ครับผม (ตอนตั้งกระทู้ไม่ได้ login)
ขอบคุณล่วงหน้าครับ
|
 |
 |
 |
 |
Date :
2010-12-12 18:59:49 |
By :
exdo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอออนุญาตขุดครับ
|
 |
 |
 |
 |
Date :
2010-12-13 00:23:26 |
By :
exdo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่มีคนตอบเลย ขอโทษที่ขุดนะครับคือยังไม่ได้เลย
|
 |
 |
 |
 |
Date :
2010-12-13 20:23:39 |
By :
exdo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่เคยใช้ ลองใส่ $baseUrl = 'http://example.com/ckfinder/files/'; แบบนี้ดูหรือยัง
แล้วดูโฟลเดอร์ pics ว่ามันอ่านได้ไหม มันใช้ mode ไหนอยู่ ใช่ 777 หรือเปล่า
|
 |
 |
 |
 |
Date :
2010-12-13 22:38:59 |
By :
PlaKriM |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมเจอแบบนี้เลย นึกว่าโฮสวินโดวไม่ต้อง chmod แต่ที่ไหนได้ต้องไป Setting up Access Permissions ด้วย
นั่งหาตั้งนาน เผื่อใครติดปัญหาเดียวกันกับผมนะครับ
|
 |
 |
 |
 |
Date :
2012-04-18 15:12:53 |
By :
Giguntic |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอาแบบนี้ไมครับ พอดีผมไปได้คำแนะนำมาจากโปรแกรมเมอร์ที่ทำเกี่ยวกับ network เค้าแนะนำเวลาทำเว็บให้ใช้แบบนี้อะครับ
$_SERVER['SCRIPT_FILENAME'] => จะได้ไดเล็กเทอรี่เช่น C:/appserv/www/web //web คือที่ตั้งของเราหลังจากนั้นให้ใช้ " ./ " เชื่อมหรือ ถ้าใช้เป็นแบบนี้ "../" ย้อนกลับ 1 Folder แล้วก็ให้ตามด้วย folder ที่เราจะเข้าไปตามหาถ้าทำแบบนี้จะใช้ได้ทั้ง window กับ ลีนุ๊ส ส่วนถ้าไม่เข้าใจที่ผมอธิบายก็ มีตัวอย่างให้ครับ เช่น $folderpic = $_SERVER['SCRIPT_FILENAME']."../pic"; ประมาณนี้ครับ
|
 |
 |
 |
 |
Date :
2012-04-19 00:22:40 |
By :
thethaicom |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
$baseUrl = '/health/pics/';
// '/health/pics/' = http://mydomain.com/health/pics/
ลองแล้ว ได้แล้วครับ
|
 |
 |
 |
 |
Date :
2012-07-27 17:38:58 |
By :
Giguntic |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|