differentiate between production and development

How to know if the application is run on development or production environment, like a C processor directive.

Some one was done sometime like this.

Hi Seyera,
Using scriptcase you can publish your project to the production server, so you dont need to make any changes to diffentiate between
development and enviroment.

If you want to know if your application is running in localhost for example or yourdomain.com you can use this PHP script:

if($_SERVER["SERVER_NAME"]=='localhost'){
     echo 'This is localhost';
}else{
     echo 'This is production';
}
1 Like