我在PHP应用程序中使用单例设计模式来创建数据库连接并选择数据库.我在CRUD操作的应用程序中多次使用此实例.
如果我的应用程序在多个线程上访问数据库,例如获得不可靠的结果,是否有任何问题?
是每个会话创建的实例还是所有线程?
我正在使用swfupload插件.当我尝试上传图像时,我想传递两个参数,但参数未被传递.
var id1='g';
var opt1='g';
function getValues()
{
id1 = $("#id").val();
opt1=$("#opt").val();
return id1.concat(opt1);
}
$(document).ready(function(){
alert(getValues()); // Here coming
$('#swfupload-control').swfupload({
upload_url: "upload-file.php?para=getValues()",//Here not coming
file_post_name: 'uploadfile',
file_size_limit : "8024",
file_types : "*.jpg;*.png;*.gif",
file_types_description : "Image files",
file_upload_limit : 10,
flash_url : "js/swfupload/swfupload.swf",
button_image_url : 'js/swfupload/wdp_buttons_upload_114x29.png',
button_width : 114,
button_height : 29,
button_placeholder : $('#button')[0],
debug: false
})
.bind('fileQueued', function(event, file){
var listitem='<li id="'+file.id+'" >'+
'File: <em>'+file.name+'</em> ('+Math.round(file.size/1024)+' KB) <span class="progressvalue" ></span>'+
'<div class="progressbar" ><div class="progress" ></div></div>'+
'<p …Run Code Online (Sandbox Code Playgroud)