Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Develop And Production Server On Same Php File

DZone's Guide to

Develop And Production Server On Same Php File

·
Free Resource
// same mysql connection file for development and production, or more servers
// can you use the global $_SERVER['HTTP_HOST'] to identify your current active server, simple huh??
// this simple scrip identify your server by address
// if you want more serves, just add a elseif clause



  
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}