我在我的服务器上重写了url,我的问题是如何保存文件。我试过使用这个功能,但它不起作用:
public function Upload($filename){
$this->displayError();
ob_clean();
if(imagepng($this->object, "/".$filename.".png"))die("OK");
else die("Error!");
imagedestroy($this->object);
die();
}
然后这样称呼它:
$image = new Image(ImageShow::getImgSource(), FALSE); // This is working
if(strtolower($data['filter']) != 'normal')$image->ApplyFilter($data['filter']); //Still no error
$image->Upload(Core::RandomString(32)); // dies Error :(