我遇到的问题是,当我提交表单时,提交网址只会附加到现有网址而不是替换它。
应该是:
var color = '#FF0000';
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var textureURL = 'http://i.imgur.com/LWHZV8v.png';
var textureIMG = new Image();
textureIMG.src = textureURL;
textureIMG.onload = function(){
canvas.width = textureIMG.width;
canvas.height = textureIMG.height;
ctx.drawImage(textureIMG,0,0);
};
window.paintNontransparent = function() {
ctx.globalCompositeOperation = "source-in";
ctx.fillStyle = color;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
但我得到了:
localhost/DataConnect/index.php/sites/MakeEdit/1
我打开表格:
localhost/DataConnect/index.php/sites/EditSite/localhost/DataConnect/index.php/sites/MakeEdit/1
所以我不确定我哪里出错了。如果我能提供更多信息,请告诉我。提前谢谢。
答案 0 :(得分:0)
尝试:
echo form_open(base_url().'sites/MakeEdit/'.$site['ID'],$attributes,$hidden);
并且不要忘记在控制器上调用网址助手:
$this->load->helper('url');