當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Installer::getDirectoryFiles方法代碼示例

本文整理匯總了PHP中Installer::getDirectoryFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Installer::getDirectoryFiles方法的具體用法?PHP Installer::getDirectoryFiles怎麽用?PHP Installer::getDirectoryFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Installer的用法示例。


在下文中一共展示了Installer::getDirectoryFiles方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Installer

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
G::LoadClass('Installer');
$inst = new Installer();
G::LoadClass('processes');
$oProcess = new Processes();
//Get Available autoinstall process
$availableProcess = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "pm");
$path = PATH_OUTTRUNK . "autoinstall" . PATH_SEP;
$message = "";
foreach ($availableProcess as $processfile) {
    $oData = $oProcess->getProcessData($path . $processfile);
    $Fields['PRO_FILENAME'] = $processfile;
    $Fields['IMPORT_OPTION'] = 2;
    $sProUid = $oData->process['PRO_UID'];
    if ($oProcess->processExists($sProUid)) {
        $message .= "{$processfile} - Not imported (process exist)<br>";
    } else {
        $oProcess->createProcessFromData($oData, $path . $processfile);
        $message .= "{$processfile} - OK<br>";
    }
}
echo $message;
開發者ID:emildev35,項目名稱:processmaker,代碼行數:31,代碼來源:autoinstallProcesses.php

示例2: microtime

    $data->checkPI = $inst->is_dir_writable(PATH_CORE . "config/");
    $data->checkDL = $inst->is_dir_writable(PATH_CORE . "content/languages/");
    $data->checkDLJ = $inst->is_dir_writable(PATH_CORE . "js/labels/");
    $data->checkPL = $inst->is_dir_writable(PATH_CORE . "plugins/");
    $data->checkXF = $inst->is_dir_writable(PATH_CORE . "xmlform/");
    $data->ao_db_wf = $s['result']['database']['ao']['ao_db_wf'];
    $data->ao_db_rb = $s['result']['database']['ao']['ao_db_rb'];
    $data->ao_db_rp = $s['result']['database']['ao']['ao_db_rp'];
    $data->ao_admin = $s['result']['admin']['username'];
    $data->ao_admin_pass = $p1 !== $p2 ? false : true;
    //*Autoinstall Process and Plugins. By JHL
    // March 11th. 2009
    // To enable the way of aoutoinstall process and/or plugins
    // at same time of initial PM setup
    //Get Available autoinstall process
    $data->availableProcess = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "pm");
    //Get Available autoinstall plugins
    $data->availablePlugins = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "tar");
    //End autoinstall
    $data->microtime = microtime(true);
    echo $oJSON->encode($data);
} else {
    if ($action === "install") {
        /*
        	 * Installation with SIMPLE POST
        	 *
        	 * Data necessary for the POST:
        	 *
        	 *
        	 * 	action=install
        	 * 	data=	{"mysqlE":"Path/to/mysql.exe",
開發者ID:nshong,項目名稱:processmaker,代碼行數:31,代碼來源:installServer.php

示例3: Installer

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
G::LoadClass('Installer');
$inst = new Installer();
G::LoadClass('processes');
$oProcess = new Processes();
//Get Available autoinstall process
$availablePlugins = $inst->getDirectoryFiles(PATH_OUTTRUNK . "autoinstall", "tar");
rsort($availablePlugins);
$path = PATH_OUTTRUNK . "autoinstall" . PATH_SEP;
$message = "";
foreach ($availablePlugins as $filename) {
    G::LoadThirdParty('pear/Archive', 'Tar');
    $tar = new Archive_Tar($path . $filename);
    $sFileName = substr($filename, 0, strrpos($filename, '.'));
    $sClassName = substr($filename, 0, strpos($filename, '-'));
    $aFiles = $tar->listContent();
    $bMainFile = false;
    $bClassFile = false;
    foreach ($aFiles as $key => $val) {
        if ($val['filename'] == $sClassName . '.php') {
            $bMainFile = true;
        }
開發者ID:emildev35,項目名稱:processmaker,代碼行數:31,代碼來源:autoinstallPlugins.php


注:本文中的Installer::getDirectoryFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。