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 | |
// 一覧を出力するディレクトリを$dir変数にセット | |
if (isset($_GET['dir']) === true) { | |
// nullバイトを削除 | |
$dir = str_replace("\0", '', $_GET['dir']); | |
} else { | |
$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 | |
function isValidInetAddress($data, $strict = false){ | |
// 次の行は、表示改行されていますが実際は一行です | |
$regex = $strict ? ' /^([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i ' : | |
' /^([*+!.&#$|\'\\%\/0-9a-z^_`{ }=?~:-]+])@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i '; | |
if(preg_match($regex, trim($data),$matches)){ | |
return array($matches[1], $matches[2]); | |
}else{ | |
return false; | |
} |
OlderNewer