Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unset($CFG);
- global $CFG;
- $CFG = new stdClass();
- $CFG->dbtype = 'mysqli';
- $CFG->dblibrary = 'native';
- $CFG->dbhost = 'localhost';
- $CFG->dbname = 'exam';
- $CFG->dbuser = 'root';
- $CFG->dbpass = '';
- $CFG->prefix = 'mdl_';
- $CFG->dboptions = array (
- 'dbpersist' => 0,
- 'dbport' => '',
- 'dbsocket' => '',
- );
- $CFG->wwwroot = "http://localhost/examination";
- $CFG->dataroot = 'F:\xampp\moodledata';
- $CFG->admin = 'admin';
- $CFG->directorypermissions = 0777;
- require_once(dirname(__FILE__) . '/lib/setup.php');
- // There is no php closing tag in this file,
- // it is intentional because it prevents trailing whitespace problems!
- // function to get ip addresss
- function getLocalIP(){
- exec("ipconfig /all", $output);
- foreach($output as $line){
- if (preg_match("/(.*)IPv4 Address(.*)/", $line)){
- $ip = $line;
- $ip = str_replace("IPv4 Address. . . . . . . . . . . :","",$ip);
- $ip = str_replace("(Preferred)","",$ip);
- }
- }
- return $ip;
- }
- //echo $ip = getLocalIP();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement