This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: 上州nize Posts(仮) | |
Plugin URI: http://www.e2esound.com/ | |
Description: 投稿内容を上州弁ぽくします。 | |
Version: 焼きまんじゅう | |
Author: Yuya Terajima | |
Author URI: http://www.e2esound.com/ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MY_Controller extends CI_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* RSS2.0/RSS1.0/Atom feed配信 | |
* @access public | |
* @params string | |
*/ | |
function feed($mode = 'rss2') | |
{ | |
$site_title = $this->init_model->get_site_info()->site_title; | |
$blog_title = $this->blog_model->get_blog_info()->page_title; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* blogページのmeta情報取得 | |
*/ | |
function get_blog_meta() | |
{ | |
$sql = | |
'SELECT ' | |
. 'PV.page_title, ' | |
. 'PV.meta_title, ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//ファイルは実際に存在 | |
$dat = '../sample.dat'; | |
$file = new SplFileInfo($dat); | |
switch(TRUE) | |
{ | |
case $file->isDir(): | |
echo 'ディレクトリです。', "<br>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Sample extends CI_Controller | |
{ | |
function __construct() | |
{ | |
parent::__construct(); | |
} | |
function index() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Main_model extends CI_Model | |
{ | |
function __construct() | |
{ | |
parent::__construct(); | |
} | |
function main_add($a, $b, $c) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Sub_model extends CI_Model | |
{ | |
function __construct() | |
{ | |
parent::__construct(); | |
} | |
function sub_add($a, $b) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MY_Model extends CI_Model | |
{ | |
protected $tbl; | |
public function __construct() | |
{ | |
parent::__construct(); | |
// Model名からテーブル名取得 | |
$this->tbl = substr(strtolower(get_class($this)), 0, -6); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Unit_test extends CI_Unit_test | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
} | |
public function report($result = array()) |
OlderNewer