■Fuelphpにて環境の振り分け例

bootstrap.php の編集を行い、開発環境や本番環境の振り分けを行う。

例)
・ポートが8080の場合 → staging環境
・ホストが”localhost”の場合 → development環境
・上記に該当しない場合 → production環境

switch (isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : '') {

//テスト環境の場合
	case '8080':
		Fuel::$env = Fuel::STAGING;
		break;

//本番環境の場合(他の条件に該当しない)
	default:
		Fuel::$env = Fuel::PRODUCTION;
		break;
}

switch (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '') {

//開発環境の場合
	case 'localhost':
		Fuel::$env = Fuel::DEVELOPMENT;
		break;
}

119 Comments

  1. buy viagra germany says:

    Buy viagra https://onlineviagra.fo.team/

    Seriously many of very good information.

  2. ivermectine says:

    stromectol for scabies https://soncheebarxu.estranky.cz/clanky/stromectol-for-head-lice.html

    Thanks a lot, Good information!

  3. stromectol for lice says:

    buy generic stromectol https://lehyriwor.estranky.sk/clanky/stromectol-cream.html

    You stated that exceptionally well.

  4. dsdgbvda.zombeek.cz says:

    Viagra cost https://dsdgbvda.zombeek.cz/

    You reported this fantastically!

  5. stromectol stock says:

    dose for stromectol https://inflavnena.zombeek.cz/

    You actually revealed that fantastically.

  6. canadian pharcharmy online says:

    buy viagra 25mg https://network.myscrs.org/profile/422020/0

    Regards, Wonderful information.

Leave a Reply