This file contains 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
class MY_Log extends CI_Log { | |
private function _write_log($level, $msg) | |
{ | |
$category = isset($this->_levels[$level]) ? '' : $level.'-'; | |
$filepath = $this->_log_path.'log-'.$category.date('Y-m-d').'.'.$this->_file_ext; | |
$message = ''; |
This file contains 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
/** | |
* Event型を受け取るときに、そのtargetプロパティの型 | |
*/ | |
interface HTMLMouseEvent<T extends HTMLElement> extends MouseEvent { | |
target: T; | |
} | |
/** | |
* 並び替え可能なリストのデータ |
This file contains 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 Register | |
* @property CI_Loader $load | |
* @property CI_Input $input | |
* @property CI_Form_validation $form_validation | |
* @property CI_Email $email | |
* @property CI_Config $config |
This file contains 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 Unprintable | |
{ | |
/** | |
* 伏字にした後の置換文字列 | |
* 置換後はこの文字列を一文字と数え代替される | |
* @var string | |
*/ |
This file contains 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
//nonceの検証(失敗したらスクリプトが停止) | |
check_ajax_referer('ajaxNonce', 'nonce'); | |
//グローバルからwpdbクラスを呼び出し | |
global $wpdb; | |
//検索条件である地域カテゴリー | |
$categories = isset($_POST['categories']) ? (array)$_POST['categories'] : array(); | |
//追加WHERE文の作成 |
This file contains 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
CREATE TABLE IF NOT EXISTS `user` ( | |
`id` INT(11) NOT NULL AUTO_INCREMENT, | |
`name` BLOB DEFAULT NULL, | |
`savings` BLOB DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1; |
This file contains 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 Media | |
* @property CI_Loader $load | |
* @property CI_Input $input | |
* @property CI_Upload $upload | |
* @property Media_model $media_model | |
*/ | |
class Media extends CI_Controller { |
This file contains 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
//controllers直下として振舞わせるサブディレクトリ名 | |
$main_directory = 'front'; | |
//サブディレクトリにある.php拡張子が付いたファイルを探してマッピング | |
$paths = scandir(APPPATH.'controllers/'.$main_directory); | |
foreach ($paths as $path) | |
{ | |
$info = pathinfo($path); | |
if ($info['extension'] === 'php') | |
{ |