3.Publish the CKFinder connector configuration and assets.
php artisan vendor:publish --tag=ckfinder
4.Create a directory for CKFinder files and allow for write access to it. By default CKFinder expects the files to be placed in public/userfiles (this can be altered in the configuration).
File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
Demo Notes
The maximum file size for uploads in this demo is 999 KB (default file size is unlimited).
Only image files (JPG, GIF, PNG) are allowed in this demo (by default there is no file type restriction).
Uploaded files will be deleted automatically after 5 minutes or less (demo files are stored in memory).
You can drag & drop files from your desktop on this webpage (see Browser support).
namespace white\tool;
class UploadHandler
{
//public function __construct 裡面的script_url調整位置
'script_url' => 'https://myurl/laravel55/shop55/public/file',
}
4.在加載的js裡面有一個檔案,main.js需要調整 Url設定,用來指向route設定的方法
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url:'https://myurl/laravel55/shop55/public/file'
});
5.調整php.ini設定
extension=php_gd2.dll
6.錯誤說明:
-如果跳出$等jquery錯誤,可能是沒有先加入jquery的function
-刪除檔案跳出405 not method allow,可能是route沒有設定正確 (any方法,確定route對),或參考3.4路徑確定正確
-上傳跳出Filed to resize image,需要調整5 php.ini設定
-記得檔案資料夾權限要設定允許寫入跟讀取
phpinfo();
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
echo "Connection to server sucessfully";
echo "Server is running: " . $redis->ping();
畫面上應該會顯示phpinfo()確定是不是有redis資訊且顯示
Connection to server sucessfullyServer is running: +PONG