本文整理汇总了PHP中CValue::files方法的典型用法代码示例。如果您正苦于以下问题:PHP CValue::files方法的具体用法?PHP CValue::files怎么用?PHP CValue::files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CValue
的用法示例。
在下文中一共展示了CValue::files方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage dPfacturation
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkEdit();
$file = CValue::files("import");
$dryrun = CValue::post("dryrun");
$facture_class = CValue::post("facture_class");
if (!$facture_class) {
$facture_class = CValue::get("facture_class");
}
$results = array();
$totaux = array("impute" => array("count" => 0, "total" => 0.0, "dates" => array()), "rejete" => array("count" => 0, "total" => 0.0), "total" => array("count" => 0, "total" => 0.0));
$i = 0;
if ($file && ($fp = fopen($file['tmp_name'], 'r'))) {
// Each line
while ($line = fgetcsv($fp, null, ";")) {
$i++;
// Skip empty lines
if (!isset($line[0]) || $line[0] == "") {
continue;
}
// Parsing
$line = array_map("trim", $line);
示例2: CMbXMLDocument
<?php
/**
* $Id: do_keeper_import.php 18947 2013-04-26 10:34:38Z kgrisel $
*
* @category Password Keeper
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @link http://www.mediboard.org */
CApp::setTimeLimit(360);
// Récupération du fichier
$file = CValue::files('datafile');
$passphrase = CValue::post('passphrase');
if (!$passphrase || !$file) {
$msg = "Le fichier et la phrase de passe doivent être saisis.";
CAppUI::stepAjax($msg, UI_MSG_ERROR);
}
$user = CMediusers::get();
$dom = new CMbXMLDocument();
if (!$dom->load($file['tmp_name'])) {
CAppUI::redirect('m=passwordKeeper&a=vw_import_keeper&dialog=1');
}
$xpath = new CMbXPath($dom);
$keeperNode = $xpath->queryUniqueNode("/keeper");
$keeperName = $keeperNode->getAttribute("name");
if ($keeperNode->nodeName != "keeper") {
CAppUI::redirect('m=passwordKeeper&a=vw_import_keeper&dialog=1');
}
$keeper = new CPasswordKeeper();
$keeper->keeper_name = $keeperName;