Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 464 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/php
<?php

#使用命名空間qbpwcf
namespace qbpwcf;

#匯入外部套件
include("/usr/lib/qbpwcf/allInOne.php");

#如果不存在要轉換成16進位的數值
if( !isset($_SERVER['argv'][1]) )
{
        #show help
        help();

        #停止執行
        exit;
}

#如果第參數為 "help" 或 "-h"
if( $_SERVER['argv'][1]==="help" || $_SERVER['argv'][1]==="-h" )
{
        #show help
        help();

        #停止執行
        exit;

}#if end

#印出結果
echo urlencode($_SERVER['argv'][1]).PHP_EOL;

#說明
function help()
{
        #說明
        echo $_SERVER['argv'][0]." string to urlencode".PHP_EOL;
}

?>