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
| <html> | |
| <head> | |
| <title>ISBN-10をAmazonサイトの書籍リンクに変換する</title> | |
| </head> | |
| <body> | |
| <?php | |
| /** | |
| * 出典: |
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
| <html> | |
| <head> | |
| <title>指定週の指定曜日を求める | Webアプリケーション スーパーサンプル</title> | |
| </head> | |
| <body> | |
| <h3>指定週の指定曜日を求める</h3> | |
| <?php |
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
| <html> | |
| <head> | |
| <title>西暦を和暦に変換する | Webアプリケーション スーパーサンプル</title> | |
| </head> | |
| <body> | |
| <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> | |
| <input type="text" name="year"> | |
| <input type="submit" name="sub1" value="変換"> | |
| </form> |
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
| <html> | |
| <head> | |
| <title>ファイルにデータを書き込む</title> | |
| </head> | |
| <body> | |
| <?php | |
| /** | |
| * 出典: |
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
| <html> | |
| <head> | |
| <title>日別のログファイルを作成する | Webアプリケーション スーパーサンプル</title> | |
| </head> | |
| <body> | |
| <?php | |
| /** | |
| * 出典: |
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
| <html> | |
| <head> | |
| <title>ファイルをオープンせずにデータを書き込む | Webアプリケーション スーパーサンプル</title> | |
| </head> | |
| <body> | |
| <?php | |
| /** | |
| * 出典: |
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 | |
| /** | |
| * dir系の関数でopendirやreaddir、closedirは使っていましたが、 | |
| * scandirは使ったことがなかったのでメモ | |
| * | |
| * ファイルが存在しない=そのディレクトリに隠しファイル2つしかない場合を判定する処理 | |
| * なるべく少ない記述で済ませたかったので下記条件文となったが、 | |
| * 本来であればarray_search()とunset()の組み合わせ等で | |
| * scandirで返された配列から隠しファイルを削除した上でif文判定をするのがベターか... |
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
| <html> | |
| <head> | |
| <title>ファイルについて調べる | Webアプリケーション スーパーサンプル</title> | |
| </head> | |
| <body> | |
| <?php | |
| /** | |
| * 出典: |
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
| <html> | |
| <head> | |
| <title>ファイル名を変更する | Webアプリケーション スーパーサンプル</title> | |
| </head> | |
| <body> | |
| <?php | |
| /** | |
| * 出典: |
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 | |
| public function slugify($text) | |
| { | |
| // 非文字や数字を'-'に置換する | |
| $text = preg_replace('#[^\\pL\d]+#u', '-', $text); | |
| // 前後の'-'を取り除く | |
| $text = trim($text, '-'); |
OlderNewer