示例#1
0
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 51 Franklin Street, Suite 330                                          |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                            |
// | Authors: Elan Ruusamäe <*****@*****.**>                               |
// +----------------------------------------------------------------------+
define('APP_PATH', dirname(__FILE__) . '/..');
require_once APP_PATH . '/autoload.php';
list($user_email, $user_password, $hostname, $port, $relative_url) = Command_Line::getEnvironmentSettings();
if (empty($port)) {
    $port = 80;
}
if (empty($relative_url)) {
    $relative_url = '/';
}
if (count($argv) == 1) {
    Command_Line::quit('Requirement argument not found');
}
// show usage information if user gave --help
if ($argv[1] == '--help' || $argv[1] == 'help') {
    Command_Line::usage(__FILE__);
}
$should_confirm = Command_Line::isSafeExecution();
$scheme = $port == 443 ? 'https' : 'http';