Kaynağa Gözat

commit delete function

superbee 8 yıl önce
ebeveyn
işleme
1153a6f9c9
1 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 11 0
      application/home/controller/User.php

+ 11 - 0
application/home/controller/User.php

@@ -76,4 +76,15 @@ class User extends Controller {
 		return json(['l'=>$info]);
 	}
 	
+	public function delete(){
+		$data = decode($this->request->post());
+		
+		$short = $data['s'];
+		
+		$path = "load/$short.txt";
+		$res = unlink($path);
+		
+		return json(['r'=>(($res)?1:0)]);
+	}
+	
 }