■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;
}

78 Comments

  1. https://kertubs.mystrikingly.com/ says:

    cialis prices https://kertubs.mystrikingly.com/

    Very good information. Appreciate it.

  2. canadian pharmacy viagra brand says:

    canadian rx world pharmacy https://kertyun.flazio.com/

    Nicely put. Kudos!

  3. prescription drugs without prior prescription says:

    canadian pharmacies mail order https://kerbnt.flazio.com/

    Reliable information. Regards!

  4. http://ime.nu/cialisonlinei.com says:

    Generic cialis tadalafil http://ime.nu/cialisonlinei.com

    Awesome posts. Cheers.

  5. kerntyast.flazio.com says:

    generic for cialis https://kerntyast.flazio.com/

    Thanks. I value it!

  6. https://gewrt.usluga.me/ says:

    canadian cialis https://gewrt.usluga.me/

    Helpful forum posts. With thanks.

  7. canada rx says:

    canadian pharmacy viagra brand https://canadian-pharmacy.webflow.io/

    Very good content. Thanks.

  8. site273035107.fo.team says:

    canadian cialis https://site273035107.fo.team/

    You actually explained that well!

  9. site656670376.fo.team says:

    cialis 5mg prix https://site656670376.fo.team/

    Thanks a lot. Numerous forum posts.

  10. best canadian pharmacies online says:

    canadian pharmacy uk delivery https://uertbx.livejournal.com/402.html

    Terrific material, Regards!

  11. canada online pharmacies says:

    trust pharmacy canada https://avuiom.sellfy.store/

    Wow quite a lot of good information!

  12. https://pharmacies.bigcartel.com/ says:

    cialis 20 mg best price https://pharmacies.bigcartel.com/

    Very good postings, Thanks a lot.

  13. kwersd.mystrikingly.com says:

    cialis 20 mg https://kwersd.mystrikingly.com/

    Wonderful information. With thanks!

  14. canadian pharmacies shipping to usa says:

    top rated online canadian pharmacies https://asebg.bigcartel.com/canadian-pharmacy

    You said it nicely.!

  15. canadian mail order pharmacies says:

    canadian pharmacy https://kertvbs.webgarden.com/

    Whoa tons of very good tips!

Leave a Reply