linux_win Posted February 3, 2007 Share Posted February 3, 2007 Hi..... i got a problem when i run my web using IIS......but when i run in my local machine using apache server...its ok.... in...any idea....to help me...???....or any code that u have that similar function with $_SERVER['DOCUMENT_ROOT'] to define my directory web....? please..help me.... :-\ Link to comment https://forums.phpfreaks.com/topic/36873-_serverdocument_root-problem-in-iis/ Share on other sites More sharing options...
Tyche Posted February 3, 2007 Share Posted February 3, 2007 if ( ! isset($_SERVER['DOCUMENT_ROOT'] ) ) $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr( $_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']) ) ); is supposed to work under IIS but I've never tested myself Link to comment https://forums.phpfreaks.com/topic/36873-_serverdocument_root-problem-in-iis/#findComment-176018 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.