Hello, I am using Extplorer and want it to access only the folder its installed in and the folder's subdirectories. my server home dir is /home/USER/public_html Help is welcomed. Thanks here is the code: // the filename of the eXtplorer script: (you rarely need to change this) if($_SERVER['SERVER_PORT'] == 443 ) { $GLOBALS["script_name"] = "https://".$GLOBALS['__SERVER']['HTTP_HOST'].$GLOBALS['__SERVER']["PHP_SELF"]; $GLOBALS['home_url'] = "https://".$GLOBALS['__SERVER']['HTTP_HOST'].dirname($GLOBALS['__SERVER']["PHP_SELF"]); } else { $GLOBALS["script_name"] = "http://".$GLOBALS['__SERVER']['HTTP_HOST'].$GLOBALS['__SERVER']["PHP_SELF"]; $GLOBALS['home_url'] = "http://".$GLOBALS['__SERVER']['HTTP_HOST'].dirname($GLOBALS['__SERVER']["PHP_SELF"]); } $GLOBALS['home_url'] = str_replace( '/administrator', '', $GLOBALS['home_url'] ); $GLOBALS['home_dir'] = !empty( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '.'; // Important Definitions! define ( "_EXT_PATH", realpath(dirname( __FILE__ ).'/..') ); define ( "_EXT_FTPTMP_PATH", realpath( dirname( __FILE__ ).'/../ftp_tmp') ); if( function_exists( 'mosGetParam') || class_exists( 'jconfig')) { define ( "_EXT_URL", $GLOBALS['home_url']."/administrator/components/com_extplorer" ); } else { define ( "_EXT_URL", dirname($GLOBALS['script_name']) ); } require_once( _EXT_PATH . '/application.php' ); require_once( _EXT_PATH.'/include/functions.php' ); PHP:
by replacing : $GLOBALS['home_dir'] = !empty( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '.'; PHP: with: $GLOBALS['home_dir'] = (dirname(__FILE__).'/..'); PHP: maybe it will help someone else in the fuutre..
Thanks kobitriki It helped me I was getting "home directory doesn't exist, check your settings" error.