標籤:
需要的檔案為flvplayer.swf檔案,不同swf檔案有一定差異,下載連結http://yun.baidu.com/share/link?shareid=2302736558&uk=1879621042,
在html的代碼為
<embed src="/js/flvplayer.swf" flashvars="vcastr_file=test.flv&IsAutoPlay=1&IsContinue=0&IsShowBar=0" width="100%" pluginspage=" http://www.macromedia.com/go/getflashplayer" quality="high" allowfullscreen="true" type="application/x-shockwave-flash"></embed>
橙色部分為引用的swf檔案,紅色部分為視頻flv檔案,藍色的為一些屬性設定,
編輯Apache的httpd.conf
LoadModule php5_module "d:/wamp/bin/php/php5.5.12/php5apache2_4.dll"PHPIniDir d:/wamp/bin/php/php5.5.12Include conf/extra/httpd-vhosts.conf
這三句,如果它們被#注釋了的話,去掉#
說明一下,第三句話一般注釋的,去掉注釋後就能開啟配置網站
然後在E:\wamp\bin\apache\apache2.4.9\conf\extra找到httpd-vhosts.conf最後添加
<VirtualHost *:80>
ServerAdmin [email protected]
#DocumentRoot "E:\Develop\PHP\internationmeitr\webfile\mobile"
DocumentRoot "D:\www\p1\web"
ServerName p1
ServerAlias p1
</VirtualHost>
藍色部分為訪問的檔案根目錄,紅色部分為訪問時瀏覽器輸入的url,
接著開啟C:\Windows\System32\drivers\etc下面的host檔案,在開頭添加127.0.0.1 p1
重啟wamp
然後在瀏覽器輸入p1/就可以訪問了,
同時mysql資料庫phpmyadmin也是相同的配置,
<VirtualHost *:80>
ServerAdmin [email protected]
#DocumentRoot "E:\Develop\PHP\internationmeitr\webfile\mobile"
DocumentRoot "E:\wamp\apps\phpmyadmin4.1.14"
ServerName phpmyadmin
ServerAlias phpmyadmin
</VirtualHost>
否則瀏覽器無法訪問到mysql資料庫。
php的有關cookie的函數必須設定路徑如
setcookie($name, base64_encode($value), $expired, ‘/‘);
那麼刪除
setcookie($name, ‘‘, time()-3600, ‘/‘);
也要設定路徑,同時在jquery的擴充jquer.cookie.js中操作
$.cookie("productidList",null,{expires: -1,path:"/"})
也必須設定路徑。
jquery擴充 jquery.form.js類比表單傳輸的,連結地址http://yun.baidu.com/share/link?shareid=351804005&uk=1879621042,也可以的直接用
$("form").serialize();例子
var options = {
success: function(){
$(‘.big_photo‘).children(‘img‘).attr(‘src‘, window.atob($.cookie(‘filepath‘)));
},
};
$("#uploadForm").ajaxForm(options);
uploadimage=function(){
if($(‘#file‘).val()){
$(‘#myModal‘).modal(‘hide‘);
$(‘#uploadForm‘).ajaxSubmit(options);
}
}
jquery.range.js滑動的進度條http://yun.baidu.com/share/link?shareid=1403206801&uk=1879621042,例子
$(‘.slider-input‘).jRange({
from: 0,
to: 200,
step: 1,
format: ‘%s‘,
width: 382,
showLabels: true,
onstatechange:function(){
$(‘.slider-input‘).trigger(‘change‘);
}
});
$(‘.slider-input‘).jRange(‘setValue‘, ‘100‘);
$(‘.slider-input‘).on(‘change‘, function() {
$(‘.big_photo img‘).width(this.value*3.8);
$(‘.big_photo img‘).height(this.value*5.04);
$(‘.big_photo img‘).css({‘left‘:(380-this.value*3.8)/2,‘top‘:(504-this.value*5.04)/2});
});
drag.js拖拽http://yun.baidu.com/share/link?shareid=98191756&uk=1879621042,例子:
$(‘.tryglass‘).each(function(){
$(this).dragging({
move : ‘both‘,
randomPosition : false
});
});
webcam.js,webcam.swf視頻照相http://yun.baidu.com/share/link?shareid=1494084583&uk=1879621042,例子:
Webcam.set({
width: 320,
height: 240,
flip_horiz: true
});
function photograph(){
$(‘#myModal‘).modal(‘hide‘);
$(‘#myModal1‘).modal(‘show‘);
Webcam.attach( ‘#my_camera‘ );
}
function take_snapshot() {
Webcam.snap( function(data_uri) {
Webcam.upload( data_uri, ‘/product/uploadimage‘, function(code, text) {
document.getElementById("big_photo").src = data_uri;
$(‘#myModal1‘).modal(‘hide‘);
} );
} );
}
html播放flv視頻,wamp多網站配置及遇到問題,php和js的cookie