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 | |
// session_register() の使用は推奨されません。 | |
$barney = "A big purple dinosaur."; | |
session_register("barney"); |
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
SQL> desc table_name; | |
名前 NULL? 型 | |
----------------------------------------- -------- ---------------------------- |
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
// iPhoneXとMacのSafariでContactForm7のカレンダーが表示されないバグ対応 | |
add_filter( 'wpcf7_support_html5_fallback', '__return_true' ); |
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 | |
// css読み込ませない start | |
function my_delete_plugin_files() { | |
wp_dequeue_style('twentytwenty-style'); | |
//wp_dequeue_style('twentytwenty-style-inline'); | |
//wp_dequeue_style('twentytwenty-print-style'); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_delete_plugin_files' ); | |
// css読み込ませない end |
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
require_once $_SERVER['DOCUMENT_ROOT'].'/ファイルパス'; |
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
require_once(dirname(__FILE__).'/common.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
<ifModule mod_rewrite.c> | |
RewriteEngine On | |
# httpの場合、httpsにリダイレクト | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
# www無しの場合、www有りにリダイレクト | |
RewriteCond %{HTTP_HOST} ^ドメイン名$ | |
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R,L] |
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
# URL正規化。https://wwwありに301リダイレクト↓ ↓ ↓ | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
RewriteCond %{HTTPS} !on | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> |
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
<div class="hoge">click me !</div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$(".hoge").click(function(){ | |
$(this).toggleClass("hoge"); | |
}); | |
}); | |
</script> |
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
<p id="aa_1">a</p> | |
<p id="aa_2">aa</p> | |
<p id="aa_3">aaa</p> | |
<p id="bb_1">b</p> | |
<p id="cc_1">c</p> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$('p[id^="aa_"]').css('color', 'red'); | |
}); |