[TOC]
> 知識點
> 百度上傳控件(WebUploader)
插件位置:X:\WWW\tp5\public\static\admin\plugins\webuploader-0.1.5
## PHP模板解析路徑問題
首先,配置文件添加代碼
位置:application/config.php
~~~
return [
'admin' => '/static/admin',
],
~~~
其次,php中讀取配置文件
~~~
$admin = config('admin');
或者
$admin = config("view_replace_str.__ADMIN__"); //重點推薦
<script src="$admin/plugins/webuploader-0.1.5/webuploader.min.js"></script>
~~~
## 整合TP5
### 1、引入CSS文件
~~~
<link href="__ADMIN__/plugins/webuploader-0.1.5/webuploader.css" rel="stylesheet">
<script src="__ADMIN__/plugins/webuploader-0.1.5/webuploader.min.js"></script>
~~~
### 2、初始化
~~~
$(document).ready(function(){
// Bootstrap fileinput插件初始化
$('#file-zh').fileinput({
language: 'zh',
uploadUrl: '#',
allowedFileExtensions: ['jpg', 'png', 'gif'],
});
// 初始化Web Uploader
uploader = WebUploader.create({
pick: {
id: '#filePicker-2',
label: '點擊選擇圖片'
},
formData: {
uid: 123
},
dnd: '#dndArea',
paste: '#uploader',
swf: '__ADMIN__/plugins/webuploader-0.1.5/Uploader.swf',
chunked: false,
chunkSize: 512 * 1024,
server: 'http://webuploader.duapp.com/server/fileupload.php',
// runtimeOrder: 'flash',
accept: {
title: 'Images',
extensions: 'gif,jpg,jpeg,bmp,png',
mimeTypes: 'image/*'
},
// 禁掉全局的拖拽功能。這樣不會出現圖片拖進頁面的時候,把圖片打開。
disableGlobalDnd: true,
fileNumLimit: 300,
fileSizeLimit: 200 * 1024 * 1024, // 200 M
fileSingleSizeLimit: 50 * 1024 * 1024 // 50 M
});
});
~~~
### 3、修改common.php
位置:\application\admin\common.php
~~~
function images($fieldinfo){
//字段名
$field = $fieldinfo['field'];
$str = <<<EOF
<div class="uploader-list-container">
<div class="queueList">
<div id="dndArea" class="placeholder">
<div id="filePicker-2"></div>
<p>或將圖片拖到這里,單次最多可選10張</p>
</div>
</div>
<div class="statusBar" style="display:none;">
<div class="progress"> <span class="text">0%</span> <span class="percentage"></span> </div>
<div class="info"></div>
<div class="btns">
<div id="filePicker2"></div>
<div class="uploadBtn">開始上傳</div>
</div>
</div>
</div>
<script src="$admin/plugins/webuploader-0.1.5/webuploader.min.js"></script>
EOF;
return $str;
}
~~~
### 4、控制器
~~~
//多圖片或多文件上傳
public function upload_images(){
$file = request()->file('file');
$info = $file->move(ROOT_PATH . 'public/uploads');
if($info) {
return json_encode($info->getSaveName());
}
}
~~~
### 5、上傳限制(圖片個數和類型)
>首先,圖片個數
~~~
$maxnumber = $setting['maxnumber'];
~~~
有兩個地方需要設置
~~~
<div class="queueList">
<div id="dndArea" class="placeholder">
<div id="filePicker-2"></div>
<p>或將圖片拖到這里,單次最多可選 $maxnumber 張</p>
</div>
</div>
// 實例化
uploader = WebUploader.create({
// 禁掉全局的拖拽功能。這樣不會出現圖片拖進頁面的時候,把圖片打開。
disableGlobalDnd: true,
fileNumLimit: $maxnumber,
fileSizeLimit: 200 * 1024 * 1024, // 200 M
fileSingleSizeLimit: 50 * 1024 * 1024 // 50 M
});
//上傳成功返回文件名
uploader.on('uploadSuccess', function(file,response){
alert(response);
});
// 上傳錯誤提示
uploader.onError = function( code ) {
if(code == "Q_EXCEED_NUM_LIMIT") {
layer.alert("只能上傳 $maxnumber 張圖片");
} else if(code == "F_DUPLICATE") {
layer.alert("重復上傳");
} else {
layer.alert("錯誤代碼:" + code);
}
};
~~~
>其次,圖片類型
~~~
$allowext = $setting['allowext'];
// 實例化
uploader = WebUploader.create({
pick: {
id: '#filePicker-2',
label: '點擊選擇圖片'
},
formData: {
uid: 123
},
dnd: '#dndArea',
paste: '#uploader',
swf: '$admin/plugins/webuploader-0.1.5/Uploader.swf',
chunked: false,
chunkSize: 512 * 1024,
server: '$url',
// runtimeOrder: 'flash',
accept: {
title: 'Images',
extensions: '$allowext',
mimeTypes: 'image/*'
},
// 禁掉全局的拖拽功能。這樣不會出現圖片拖進頁面的時候,把圖片打開。
disableGlobalDnd: true,
fileNumLimit: $maxnumber,
fileSizeLimit: 200 * 1024 * 1024, // 200 M
fileSingleSizeLimit: 50 * 1024 * 1024 // 50 M
});
~~~
### 6、保存到數據庫
思路:異步發送到控制器,控制器上傳成功,則返回文件名;前端添加隱藏表單,把這個文件名作為屬性隱藏起來;統一提交到數據庫保存
~~~
<input type="hidden" id="info_$field" name="info[$field]" class="input-large form-control">
//上傳成功返回文件名
uploader.on('uploadSuccess', function(file,response){
var images_value = $('#info_$field').val()=='' ? '' : $('#info_$field').val() + ',';
$('#info_$field').val( images_value + response);
});
~~~
## 完善WebUploader相關功能
### (一)圖片上傳成功顯示刪除按鈕
思路:修改common.php
~~~
file.on('statuschange', function( cur, prev ) {
if ( prev === 'progress' ) {
prgress.hide().width(0);
} else if ( prev === 'queued' ) {
//li.off( 'mouseenter mouseleave' ); //解除事件監聽
//btns.remove();
li.find( 'span.rotateLeft' ).remove(); //移除左旋轉按鈕
li.find( 'span.rotateRight' ).remove(); //移除右旋轉按鈕
}
});
~~~
### (二)執行刪除操作
思路:把上傳成功的圖片路徑賦值給圖片
#### 1、修改common.php
~~~
$delete_url = url('delete_file');
var img_src = li.attr('studyfox_img');
// 負責view的銷毀
function removeFile( file ) {
var li = $('#'+file.id);
var img_src = li.attr('studyfox_img');
delete percentages[ file.id ];
updateTotalProgress();
li.off().find('.file-panel').off().end().remove();
//后臺刪除圖片
$.ajax({
url: '$delete_url',
type: 'POST',
data: {'img': img_src},
success: function(result, textStatus){
alert(textStatus);
alert(result);
}
});
}
~~~
上傳成功返回文件名
~~~
uploader.on('uploadSuccess', function(file,response){
var images_value = $('#info_$field').val()=='' ? '' : $('#info_$field').val() + ',';
$('#info_$field').val( images_value + response);
//在當前圖片LI里添加圖片地址
$('#'+file.id).attr('studyfox_img',response);
});
~~~
#### 2、把圖片路徑發給控制器處理
~~~
//刪除文件或圖片
public function delete_file(){
$delete_url = input('img');
try {
unlink(ROOT_PATH . 'public/uploads/' . $delete_url); //刪除成功返回1
} catch (Exception $e) { }
}
~~~
## 完整代碼
~~~
function images($fieldinfo){
//字段名
$field = $fieldinfo['field'];
$url = url('upload_images');
$delete_url = url('delete_file');
//反序列化設置項
$setting = unserialize($fieldinfo['setting']);
$allowext = $setting['allowext'];
$maxnumber = $setting['maxnumber'];
$str = <<<EOF
<input type="hidden" id="info_$field" name="info[$field]" class="input-large form-control">
<div class="uploader-list-container">
<div class="queueList">
<div id="dndArea" class="placeholder">
<div id="filePicker-2"></div>
<p>或將圖片拖到這里,單次最多可選 $maxnumber 張</p>
</div>
</div>
<div class="statusBar" style="display:none;">
<div class="progress"> <span class="text">0%</span> <span class="percentage"></span> </div>
<div class="info"></div>
<div class="btns">
<div id="filePicker2"></div>
<div class="uploadBtn">開始上傳</div>
</div>
</div>
</div>
<script src="__ADMIN__/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script type="text/javascript" >
(function( $ ){
// 當domReady的時候開始初始化
$(function() {
var wrap = $('.uploader-list-container'),
// 圖片容器
queue = $( '<ul class="filelist"></ul>' )
.appendTo( wrap.find( '.queueList' ) ),
// 狀態欄,包括進度和控制按鈕
statusBar = wrap.find( '.statusBar' ),
// 文件總體選擇信息。
info = statusBar.find( '.info' ),
// 上傳按鈕
upload = wrap.find( '.uploadBtn' ),
// 沒選擇文件之前的內容。
placeHolder = wrap.find( '.placeholder' ),
progress = statusBar.find( '.progress' ).hide(),
// 添加的文件數量
fileCount = 0,
// 添加的文件總大小
fileSize = 0,
// 優化retina, 在retina下這個值是2
ratio = window.devicePixelRatio || 1,
// 縮略圖大小
thumbnailWidth = 110 * ratio,
thumbnailHeight = 110 * ratio,
// 可能有pedding, ready, uploading, confirm, done.
state = 'pedding',
// 所有文件的進度信息,key為file id
percentages = {},
// 判斷瀏覽器是否支持圖片的base64
isSupportBase64 = ( function() {
var data = new Image();
var support = true;
data.onload = data.onerror = function() {
if( this.width != 1 || this.height != 1 ) {
support = false;
}
}
data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
return support;
} )(),
// 檢測是否已經安裝flash,檢測flash的版本
flashVersion = ( function() {
var version;
try {
version = navigator.plugins[ 'Shockwave Flash' ];
version = version.description;
} catch ( ex ) {
try {
version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')
.GetVariable('version');
} catch ( ex2 ) {
version = '0.0';
}
}
version = version.match( /\d+/g );
return parseFloat( version[ 0 ] + '.' + version[ 1 ], 10 );
} )(),
supportTransition = (function(){
var s = document.createElement('p').style,
r = 'transition' in s ||
'WebkitTransition' in s ||
'MozTransition' in s ||
'msTransition' in s ||
'OTransition' in s;
s = null;
return r;
})(),
// WebUploader實例
uploader;
// 實例化
uploader = WebUploader.create({
pick: {
id: '#filePicker-2',
label: '點擊選擇圖片'
},
formData: {
uid: 123
},
dnd: '#dndArea',
paste: '#uploader',
swf: '__ADMIN__/plugins/webuploader-0.1.5/Uploader.swf',
chunked: false,
chunkSize: 512 * 1024,
server: '$url',
// runtimeOrder: 'flash',
accept: {
title: 'Images',
extensions: '$allowext',
mimeTypes: 'image/*'
},
// 禁掉全局的拖拽功能。這樣不會出現圖片拖進頁面的時候,把圖片打開。
disableGlobalDnd: true,
fileNumLimit: $maxnumber,
fileSizeLimit: 200 * 1024 * 1024, // 200 M
fileSingleSizeLimit: 50 * 1024 * 1024 // 50 M
});
// 拖拽時不接受 js, txt 文件。
uploader.on( 'dndAccept', function( items ) {
var denied = false,
len = items.length,
i = 0,
// 修改js類型
unAllowed = 'text/plain;application/javascript ';
for ( ; i < len; i++ ) {
// 如果在列表里面
if ( ~unAllowed.indexOf( items[ i ].type ) ) {
denied = true;
break;
}
}
return !denied;
});
uploader.on('dialogOpen', function() {
console.log('here');
});
// uploader.on('filesQueued', function() {
// uploader.sort(function( a, b ) {
// if ( a.name < b.name )
// return -1;
// if ( a.name > b.name )
// return 1;
// return 0;
// });
// });
// 添加“添加文件”的按鈕,
uploader.addButton({
id: '#filePicker2',
label: '繼續添加'
});
uploader.on('ready', function() {
window.uploader = uploader;
});
// 當有文件添加進來時執行,負責view的創建
function addFile( file ) {
var li = $( '<li id="' + file.id + '">' +
'<p class="title">' + file.name + '</p>' +
'<p class="imgWrap"></p>'+
'<p class="progress"><span></span></p>' +
'</li>' ),
btns = $('<div class="file-panel">' +
'<span class="cancel">刪除</span>' +
'<span class="rotateRight">向右旋轉</span>' +
'<span class="rotateLeft">向左旋轉</span></div>').appendTo( li ),
prgress = li.find('p.progress span'),
wrap = li.find( 'p.imgWrap' ),
info = $('<p class="error"></p>'),
showError = function( code ) {
switch( code ) {
case 'exceed_size':
text = '文件大小超出';
break;
case 'interrupt':
text = '上傳暫停';
break;
default:
text = '上傳失敗,請重試';
break;
}
info.text( text ).appendTo( li );
};
if ( file.getStatus() === 'invalid' ) {
showError( file.statusText );
} else {
// @todo lazyload
wrap.text( '預覽中' );
uploader.makeThumb( file, function( error, src ) {
var img;
if ( error ) {
wrap.text( '不能預覽' );
return;
}
if( isSupportBase64 ) {
img = $('<img src="'+src+'">');
wrap.empty().append( img );
} else {
$.ajax('../server/preview.php', {
method: 'POST',
data: src,
dataType:'json'
}).done(function( response ) {
if (response.result) {
img = $('<img src="'+response.result+'">');
wrap.empty().append( img );
} else {
wrap.text("預覽出錯");
}
});
}
}, thumbnailWidth, thumbnailHeight );
percentages[ file.id ] = [ file.size, 0 ];
file.rotation = 0;
}
file.on('statuschange', function( cur, prev ) {
if ( prev === 'progress' ) {
prgress.hide().width(0);
} else if ( prev === 'queued' ) {
//li.off( 'mouseenter mouseleave' ); //解除事件監聽
//btns.remove();
li.find( 'span.rotateLeft' ).remove(); //移除左旋轉按鈕
li.find( 'span.rotateRight' ).remove(); //移除右旋轉按鈕
}
// 成功
if ( cur === 'error' || cur === 'invalid' ) {
console.log( file.statusText );
showError( file.statusText );
percentages[ file.id ][ 1 ] = 1;
} else if ( cur === 'interrupt' ) {
showError( 'interrupt' );
} else if ( cur === 'queued' ) {
percentages[ file.id ][ 1 ] = 0;
} else if ( cur === 'progress' ) {
info.remove();
prgress.css('display', 'block');
} else if ( cur === 'complete' ) {
li.append( '<span class="success"></span>' );
}
li.removeClass( 'state-' + prev ).addClass( 'state-' + cur );
});
li.on( 'mouseenter', function() {
btns.stop().animate({height: 30});
});
li.on( 'mouseleave', function() {
btns.stop().animate({height: 0});
});
btns.on( 'click', 'span', function() {
var index = $(this).index(),
deg;
switch ( index ) {
case 0:
uploader.removeFile( file );
return;
case 1:
file.rotation += 90;
break;
case 2:
file.rotation -= 90;
break;
}
if ( supportTransition ) {
deg = 'rotate(' + file.rotation + 'deg)';
wrap.css({
'-webkit-transform': deg,
'-mos-transform': deg,
'-o-transform': deg,
'transform': deg
});
} else {
wrap.css( 'filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation='+ (~~((file.rotation/90)%4 + 4)%4) +')');
// use jquery animate to rotation
// $({
// rotation: rotation
// }).animate({
// rotation: file.rotation
// }, {
// easing: 'linear',
// step: function( now ) {
// now = now * Math.PI / 180;
// var cos = Math.cos( now ),
// sin = Math.sin( now );
// $wrap.css( 'filter', "progid:DXImageTransform.Microsoft.Matrix(M11=" + cos + ",M12=" + (-sin) + ",M21=" + sin + ",M22=" + cos + ",SizingMethod='auto expand')");
// }
// });
}
});
li.appendTo( queue );
}
// 負責view的銷毀
function removeFile( file ) {
var li = $('#'+file.id);
var img_src = li.attr('studyfox_img');
delete percentages[ file.id ];
updateTotalProgress();
li.off().find('.file-panel').off().end().remove();
//后臺刪除圖片
$.ajax({
url: '$delete_url',
type: 'POST',
data: {'img': img_src},
success: function(result, textStatus){
//圖片刪除成功后移除文本框圖片信息,三種情況 ,號位置在前 后 或沒有,號
var images_value = $('#info_$field').val();//隱藏文本框的值
images_value = images_value.replace(img_src+',', ''); //替換,號在右邊
images_value = images_value.replace(','+img_src, ''); //替換,號在左邊
images_value = images_value.replace(img_src, ''); //直接替換
//重新賦值
$('#info_$field').val(images_value);
},
error: function(XMLHttpRequest, textStatus){
layer.alert('刪除失敗!', {icon:2});
}
});
}
//上傳成功返回文件名
uploader.on('uploadSuccess', function(file,response){
var images_value = $('#info_$field').val()=='' ? '' : $('#info_$field').val() + ',';
$('#info_$field').val( images_value + response);
//在當前圖片LI里添加圖片地址
$('#'+file.id).attr('studyfox_img',response);
});
function updateTotalProgress() {
var loaded = 0,
total = 0,
spans = progress.children(),
percent;
$.each( percentages, function( k, v ) {
total += v[ 0 ];
loaded += v[ 0 ] * v[ 1 ];
} );
percent = total ? loaded / total : 0;
spans.eq( 0 ).text( Math.round( percent * 100 ) + '%' );
spans.eq( 1 ).css( 'width', Math.round( percent * 100 ) + '%' );
updateStatus();
}
function updateStatus() {
var text = '', stats;
if ( state === 'ready' ) {
text = '選中' + fileCount + '張圖片,共' +
WebUploader.formatSize( fileSize ) + '。';
} else if ( state === 'confirm' ) {
stats = uploader.getStats();
if ( stats.uploadFailNum ) {
text = '已成功上傳' + stats.successNum+ '張圖片至服務器,'+
stats.uploadFailNum + '張圖片上傳失敗,<a class="retry" href="#">重新上傳</a>失敗圖片或<a class="ignore" href="#">忽略</a>'
}
} else {
stats = uploader.getStats();
text = '共' + fileCount + '張(' +
WebUploader.formatSize( fileSize ) +
'),已上傳' + stats.successNum + '張';
if ( stats.uploadFailNum ) {
text += ',失敗' + stats.uploadFailNum + '張';
}
}
info.html( text );
}
function setState( val ) {
var file, stats;
if ( val === state ) {
return;
}
upload.removeClass( 'state-' + state );
upload.addClass( 'state-' + val );
state = val;
switch ( state ) {
case 'pedding':
placeHolder.removeClass( 'element-invisible' );
queue.hide();
statusBar.addClass( 'element-invisible' );
uploader.refresh();
break;
case 'ready':
placeHolder.addClass( 'element-invisible' );
$( '#filePicker2' ).removeClass( 'element-invisible');
queue.show();
statusBar.removeClass('element-invisible');
uploader.refresh();
break;
case 'uploading':
$( '#filePicker2' ).addClass( 'element-invisible' );
progress.show();
upload.text( '暫停上傳' );
break;
case 'paused':
progress.show();
upload.text( '繼續上傳' );
break;
case 'confirm':
progress.hide();
$( '#filePicker2' ).removeClass( 'element-invisible' );
upload.text( '開始上傳' );
stats = uploader.getStats();
if ( stats.successNum && !stats.uploadFailNum ) {
setState( 'finish' );
return;
}
break;
case 'finish':
stats = uploader.getStats();
if ( stats.successNum ) {
layer.alert( '上傳成功' );
} else {
// 沒有成功的圖片,重設
state = 'done';
location.reload();
}
break;
}
updateStatus();
}
uploader.onUploadProgress = function( file, percentage ) {
var li = $('#'+file.id),
percent = li.find('.progress span');
percent.css( 'width', percentage * 100 + '%' );
percentages[ file.id ][ 1 ] = percentage;
updateTotalProgress();
};
uploader.onFileQueued = function( file ) {
fileCount++;
fileSize += file.size;
if ( fileCount === 1 ) {
placeHolder.addClass( 'element-invisible' );
statusBar.show();
}
addFile( file );
setState( 'ready' );
updateTotalProgress();
};
uploader.onFileDequeued = function( file ) {
fileCount--;
fileSize -= file.size;
if ( !fileCount ) {
setState( 'pedding' );
}
removeFile( file );
updateTotalProgress();
};
uploader.on( 'all', function( type ) {
var stats;
switch( type ) {
case 'uploadFinished':
setState( 'confirm' );
break;
case 'startUpload':
setState( 'uploading' );
break;
case 'stopUpload':
setState( 'paused' );
break;
}
});
uploader.onError = function( code ) {
if(code == "Q_EXCEED_NUM_LIMIT") {
layer.alert("只能上傳 $maxnumber 張圖片");
} else if(code == "F_DUPLICATE") {
layer.alert("重復上傳");
} else {
layer.alert("錯誤代碼:" + code);
}
};
upload.on('click', function() {
if ( $(this).hasClass( 'disabled' ) ) {
return false;
}
if ( state === 'ready' ) {
uploader.upload();
} else if ( state === 'paused' ) {
uploader.upload();
} else if ( state === 'uploading' ) {
uploader.stop();
}
});
info.on( 'click', '.retry', function() {
uploader.retry();
} );
info.on( 'click', '.ignore', function() {
alert( 'todo' );
} );
upload.addClass( 'state-' + state );
updateTotalProgress();
});
})( jQuery );
</script>
EOF;
return $str;
}
~~~
- Layer無刷新不跳轉彈框提示信息
- 整合ThinkPHP+實用代碼
- TP整合Layer插件實現無刷新
- 自定義助手函數
- 添加信息失敗后不跳轉
- 三種無限級分類
- TP常用代碼
- 自定義公共函數
- TP模型管理專題
- TP模型管理之添加模型
- sfox_newmodel.sql
- TP模型管理之刪除模型
- TP模型管理之編輯模型
- TP模型管理之字段添加
- sfox_newmodel.sql_edit
- layer_hplus.js_edit
- TP模型管理之字段刪除
- TP模型管理之字段編輯
- TP模型管理之預覽模型
- TP模型管理之公共函數
- layer_hplus.js_修訂一
- TP模型管理之預覽模型靜態頁
- 后臺內容管理系統
- 分類樹顯示
- 內容列表顯示
- 信息發布
- 編輯信息
- layer_hplus.js
- myJs第一版
- myJs第二版
- myJs第三版
- myJs第四版
- TP5插件用法
- Datatables
- WebUploader
- bootstrap-fileinput
- UEditor
- 簡單調用
- 路徑問題
- 跨域多圖上傳
- 跨域單圖上傳
- UEditor圖片跨域上傳解決方案
- 定制工具欄圖標
- ajaxFileUpload
- LayUI
- 圖片上傳
- layui分頁
- 搜索頁
- 搜索優化及刪除
- Uploadify
- TP5前端應用
- 靜態首頁
- 前臺首頁功能實現
- 自定義標簽庫
- 前臺模板繼承應用
- 首頁自定義標簽改進
- 文章內容頁
- 自定義標簽改進
- 自定義標簽修正
- 圖片等比例自動縮放
- 后臺權限管理
- 角色管理
- 規則管理
- 權限設置
- 會員管理
- 權限管理
- 前臺登錄注冊功能
- 注冊登錄
- 阿里大于手機注冊
- 阿里大于升級阿里云短信服務
- 自動登錄完成
- PHP異位或加密實現自動登陸
- 微信開發
- 分享接口
- 靜態頁面實現微信分享
- 動態頁微信分享
- 頁面靜態化
- 1-全站靜態化前期配置
- 2-鏈接地址靜態化
- TP5常用片段代碼
- 加載靜態資源路徑與常量
- thinkphp5預定義常量
- 刪除某文件夾的內容
- 解壓插件包
- 異步提交插件
- 其他功能
- 背景音樂
- 手機訪問PC網站自動跳轉到手機網站代碼
- 手機微信音樂MP3播放器
- 后盾之網頁背景音樂
- 播放器寬度自適應
- 前臺首頁數據調用
- 視頻列表
- 搜索分頁
- H5解決蘋果(IOS)不能自動播放音樂
- 清空緩存
- 文件處理常識
- 刪除路徑下的所有文件夾和文件
- 一鍵清空緩存
- 評論留言
- 格式化時間
- 替換微博內容的URL地址@用戶與表情
- PHP正則理解
- jQuery評論插件
- TP空操作
- TP路由
- 跨域訪問
- 設置請其頭允許跨域請求
- 模板前臺判斷手機訪問跳轉手機網址代碼
- PHP遍歷一個文件夾下所有文件和子文件夾
- PHP獲取視頻的第一幀與時長
- TP5數據庫
- 鏈式操作原理
- update替換字段部分內容
- 后臺開發
- 后臺登錄頁居中顯示
- TP5自帶驗證碼
- JS & JQuery專題
- 二級城市聯動菜單
- 模板引擎
- 混合模板編譯
- 黃永成TP微博開發
- 消息推送
- memcache安裝
- 插件開發
- 插件介紹
- 插件鉤子
- 淺談初步理解鉤子
- 插件鉤子(hooks)分析
- 插件鉤子簡單理解
- 控制器調用插件
- 鉤子通用處理函數
- 插件基類代碼
- 插件測試代碼
- 淺談鉤子與插件
- 技術綜合
- 常用代碼
- PHP
- 56個PHP開發常用代碼片段(上)
- 56個PHP 開發常用代碼片段(中)
- 56個PHP 開發常用代碼片段(下)
- sublime text安裝自動補全注釋的插件
- 影音視頻開發
- 視頻
- H5視頻直播掃盲
- 音樂
- 語音
- PHP實現語音播報功能
- MUI
- 窗體操作