Created
September 7, 2018 11:25
-
-
Save sola-msr/908c467360cec71839a99c2e6299a28e to your computer and use it in GitHub Desktop.
【PHP】サーバーのホスト名によって実行する処理を切り分ける ref: https://qiita.com/sola-msr/items/4b3f4cf0f5de44036846
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
// 1号機以外は処理を実行しない | |
if (gethostname() === 'server_one') { | |
// 1号機のみ実行する処理 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment