Skip to content

Instantly share code, notes, and snippets.

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