Announcement

Collapse
No announcement yet.

differentiate between production and development

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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:

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

    Last edited by hirambq; 01-27-2013, 09:26 PM.
    Best Regards
    Hiram BQ

    Comment

    Working...
    X