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 | |
| error_reporting(E_ERROR | E_WARNING | E_PARSE); | |
| // -------------------------------------------- | |
| // 対象日時チェック(コマンドライン引数かURLパラメータか) | |
| $target_date = $_REQUEST['$target_date'] ? $_REQUEST['$target_date'] : ($argv[1] ? $argv[1] : date('Ymd')); | |
| $year = substr($target_date,0,4); | |
| $month = substr($target_date,4,2); | |
| $day = substr($target_date,6,2); | |
| if (false === checkdate($month,$day,$year)){ |
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
| #/bin/sh | |
| ext_list=("*.pl" "*.htm" "*.html" "*.db") | |
| if [ $# -ne 1 ]; then | |
| echo "対象のpathを指定してください" 1>&2 | |
| exit 1 | |
| else | |
| if [ -e $1 ]; then | |
| for idx in "${ext_list[@]}" |