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 | |
// OSがサポートしているディレクトリの区切り文字 | |
// Windowsでは\、Linuxでは/ | |
$dir_sep = DIRECTORY_SEPARATOR ; | |
// このファイル自身(絶対パス) | |
$file = __FILE__ ; | |
// このファイルの置かれているディレクトリ(絶対パス) | |
$dir = dirname( __FILE__ ) ; | |
// 実行中のファイルが置かれているディレクトリ(絶対パス) | |
$realpath = realpath( '.' ) ; |
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 | |
require_once 'Zend/Filter/Interface.php'; | |
class My_Filter_NormalizeMagicQuotesGpc implements Zend_Filter_Interface | |
{ | |
protected $_flag ; | |
public function __construct( $flag = false ) | |
{ | |
$this->_flag = ( boolean ) $flag ; |
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
.button a { | |
/* text-style */ | |
font-size: 12px; | |
color: #03c; | |
text-align: center; | |
text-decoration: none; | |
line-height: 100%; | |
/* block-style */ | |
display: block; |
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 | |
require_once 'Zend/View/Helper/Abstract.php'; | |
class Juke_View_Helper_Request extends Zend_View_Helper_Abstract | |
{ | |
public function request() | |
{ | |
return $this ; | |
} | |
public function __call( $method, $args ) |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>test</title> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript">google.load("jquery", "1.4");</script> | |
<script type="text/javascript" src="jquery.accordion_tree.js"></script> | |
</head> | |
<body> |
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 Koshian_File implements Iterator | |
{ | |
private $_lines = array(); | |
private $_index = 0; | |
public function __construct( $file, $flag = 0 ) | |
{ | |
if( file_exists( $file ) && is_readable( $file ) ) { | |
$this->_lines = file( $file, $flag ) ; |
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 | |
// 「a」という箱に「あ」が入ってる | |
$array['a'] = 'あ' ; | |
// 「b」という箱に「い」が入ってる | |
$array['b'] = 'い' ; | |
// 「c」という箱に「う」が入ってる | |
$array['c'] = 'う' ; | |
// 「い」 を表示したい時は「b」という箱を参照してやる | |
echo $array['b'] ; |
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 | |
$a = 1 ; | |
switch( true ) { | |
case ( is_string( $a ) ) : | |
echo '$a は 文字列' ; | |
break ; | |
case ( is_integer( $a ) ) : | |
echo '$a は 数値' ; | |
break ; |
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 | |
$cache_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'cache' ; | |
if( realpath( $cache_dir ) === false ) { | |
if( ! mkdir( $cache_dir, 0777 ) ) { | |
exit( 'Error!' ) ; | |
} | |
} | |
$cache_dir = realpath( $cache_dir ) ; | |
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 DB{ | |
var $db_encoding="UTF-8"; | |
var $script_encoding="UTF-8"; | |
var $db=null; | |
#--------------------------- | |
# constructer | |
#--------------------------- | |
function DB($db=DBNAME,$user=USER,$pass=PASS,$host=HOST){ |
OlderNewer