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 | |
| function sslchk() | |
| { | |
| if ((false === empty($_SERVER['HTTPS'])) && ('off' !== $_SERVER['HTTPS'])) { | |
| return true; | |
| } | |
| return false; | |
| } |
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 | |
| $haystack = "11,10,1,4,5"; | |
| $needle = 1; | |
| $pos = strpos(','.$haystack.',', ','.$needle.','); | |
| if($pos !== false){ | |
| echo "ok:".$pos; | |
| }else{ |
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
| jQuery.noConflict(); | |
| (function($) { | |
| // 実行させたい処理をここに書く | |
| })(jQuery); |
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
| <form name="form" method="post" action="./"> | |
| <a href="javascript:void(0)" onclick="document.form.submit();return false;">submit</a> | |
| <input type=hidden name="hoge" value="test"> | |
| </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
| <?php | |
| /** | |
| * EUCをUTF-8へと変換 | |
| * @param mixed $var 変換したい値 | |
| * @return mixed 変換した値を返す | |
| */ | |
| function chgUTF($var) | |
| { | |
| if (is_array($var)) { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Document</title> | |
| <script> | |
| function chk(f){ | |
| if(!f.mail.value){ | |
| alert('error'); | |
| return false; | |
| } |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 | |
| /** | |
| * ファイル検索対象拡張子 | |
| */ | |
| define('IMG_EXTENSION', '{jpg,png,gif}'); | |
| define('OFFICE_EXTENSION', '{pdf}'); | |
| function fileSearch($con) | |
| { |
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
| function radioChk(name) | |
| { | |
| var elements; | |
| var len; | |
| var i; | |
| elements = document.getElementsByName(name); | |
| if (elements) { | |
| len = elements.length; | |
| for (i = 0; i < len; i ++) { | |
| if (elements[i].checked) { |
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
| $.ajax({ | |
| type: "GET", | |
| url: "ajax.php", | |
| cache: false, | |
| dataType: "html", | |
| data: { | |
| p1: "hoge", | |
| p2: "fuga" | |
| } | |
| }).done(function(html){ |
OlderNewer