This file contains 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
<VirtualHost *:80> | |
ServerAdmin ○○○○@○○○○.○○○ | |
ServerName ○○○○.○○○ | |
ServerAlias *.○○○○.○○○ | |
VirtualDocumentRoot /home/webroot/%1/htdocs/ | |
ErrorLog logs/○○○○.○○○-error_log | |
CustomLog logs/○○○○.○○○-access_log common | |
</VirtualHost> |
This file contains 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
You can add this entry in your /etc/hosts file: | |
127.0.0.1 www.sublimetext.com |
This file contains 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 mb_wordwrap($string, $width=75, $break="\n", $cut = false) { | |
if (!$cut) { | |
$regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){'.$width.',}\b#U'; | |
} else { | |
$regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){'.$width.'}#'; | |
} | |
$string_length = mb_strlen($string,'UTF-8'); | |
$cut_length = ceil($string_length / $width); | |
$i = 1; |
This file contains 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 SendAttachedMail( $from , $to , $subject , $body , &$file ){ | |
mb_language( 'ja' ); |
This file contains 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class ImageGd | |
{ | |
public function convert_en($im1) | |
{ | |
$w = imagesx($im1); | |
$h = imagesy($im1); | |
This file contains 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 | |
$lang['cal_su'] = "日"; | |
$lang['cal_mo'] = "月"; | |
$lang['cal_tu'] = "火"; | |
$lang['cal_we'] = "水"; | |
$lang['cal_th'] = "木"; | |
$lang['cal_fr'] = "金"; | |
$lang['cal_sa'] = "土"; | |
$lang['cal_sun'] = "日曜"; |
This file contains 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 | |
/** | |
* Part of the Fuel framework. | |
* | |
* @package Fuel | |
* @version 1.7 | |
* @author Fuel Development Team | |
* @license MIT License | |
* @copyright 2010 - 2013 Fuel Development Team | |
* @link http://fuelphp.com |
This file contains 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
1: | |
composer.jsonファイルを編集 | |
"require": { | |
"php": ">=5.3.3", | |
"monolog/monolog": "1.5.*", | |
"fuelphp/upload": "2.0", | |
"aws/aws-sdk-php": "2.2.*" | |
}, |
This file contains 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
// 自動生成 sublime text を使うと便利 | |
Generators resource users | |
username:string[50],email:string[100],password:string[100],active:tinyinteger:defalut(0),suspended:tinyinteger:defalut(0),level:integer:defalut(1),deleted_at:timestamp:nullable() | |
※model/User.php は予め用意されていますので、消されないように注意してください。 |
This file contains 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 Aws\Common\Aws; | |
class Controller_S3 extends Controller | |
{ | |
public function action_index() | |
{ | |
// Config::load('aws', true); | |
$aws = Config::get('aws'); | |
$s3 = Aws::factory( $aws['services']['default_settings']['params'] )->get('s3'); |
OlderNewer