获得当前域名下的url return sprintf( '%s://%s%s', $_SERVER['REQUEST_SCHEME'], $_SERVER['HTTP_HOST'], $pictures[array_rand($pictures, 1)] );