本文整理汇总了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;
示例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",
示例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;
}