ともやん・どっと・ねっと php
https://www.tomoyan.net/
2024-03-29T19:57:39+00:00
ともやん・どっと・ねっと
https://www.tomoyan.net/
https://www.tomoyan.net/lib/tpl/bs3tomoyannet/images/favicon.ico
-
text/html
2024-03-27T10:51:49+00:00
ともやん (tomoyan@undisclosed.example.com)
php:is_ssl
https://www.tomoyan.net/php/is_ssl?rev=1711504309&do=diff
SSLであるかを調べる
Dokuwiki - init.php より
/**
* Check if accessed via HTTPS
*
* Apache leaves ,$_SERVER['HTTPS'] empty when not available, IIS sets it to 'off'.
* 'false' and 'disabled' are just guessing
*
* @returns bool true when SSL is active
*/
function is_ssl(){
if (!isset($_SERVER['HTTPS']) ||
preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){
return false;
}else{
return true;
}
}
-
text/html
2024-03-27T10:51:27+00:00
ともやん (tomoyan@undisclosed.example.com)
php:fuelphp:oil_generate_model - [create_at、update_at を timestamp 型にする方法]
https://www.tomoyan.net/php/fuelphp/oil_generate_model?rev=1711504287&do=diff
oil コマンドによる model と migration 定義の生成
コマンドの実行方法
oil コマンドは /fuelapp 直下に存在する。
$ cd fuelapp
$ oil generate model tablename column1:varchar[10] column2:int column3:datetime column4:text