Skip to content

Instantly share code, notes, and snippets.

@Liaodd
Liaodd / Controller_REST.php
Created September 9, 2014 15:52
K3 REST CONTROLLER
<?php
class Controller_REST {
public function before() {
$this->request->action(Request::$method);
}
}
@Liaodd
Liaodd / Q1.md
Last active August 29, 2015 14:06
Answers to bx

假设id为编号, 在取得id后,根据业务逻辑读取数据

<?php 
  
    $id = isset($_GET['id']) ? $_GET['id'] : '';

    if(!is_numeric($id)) {
 die('invalid params');
@Liaodd
Liaodd / git-archive.sh
Last active August 29, 2015 14:03
git archive
git archive --format zip --output /full/path/to/zipfile.zip master