本文整理汇总了PHP中app\models\Company::getFilePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::getFilePath方法的具体用法?PHP Company::getFilePath怎么用?PHP Company::getFilePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Company
的用法示例。
在下文中一共展示了Company::getFilePath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCertFilePath
public static function getCertFilePath($id = null)
{
if ($id == null) {
$id = \app\helpers\Linet3Helper::getUserId();
}
$user = User::findOne($id);
if ($user !== null) {
return Company::getFilePath() . "cert/" . $id . ".p12";
}
}
示例2: getFullPath
public function getFullPath()
{
return Company::getFilePath() . $this->path;
}
示例3: actionLinet2import
public function actionLinet2import()
{
$model = new FormLinet2Import();
if (isset($_POST['FormLinet2Import'])) {
$configPath = \app\helpers\Linet3Helper::getSetting("company.path");
$file = Company::getFilePath() . "linet2.bak";
$model->file = $_POST['FormLinet2Import']['file'];
$model->file = \yii\web\UploadedFile::getInstance($model, 'file');
if ($model->file === null) {
throw new \yii\web\HttpException(501, Yii::t('app', 'Error in request.'));
}
//no file
if ($model->file->saveAs($file)) {
$model->file = $file;
$model->import();
//$model->read();
}
}
return $this->render('linet2Import', array('model' => $model));
Yii::$app->end();
}
示例4: import
function import($account)
{
$file = \yii\web\UploadedFile::getInstance($this, 'file');
//echo 'not file';
if (is_object($file) && get_class($file) === 'yii\\web\\UploadedFile') {
//echo 'is file';
$filename = Company::getFilePath() . "TNout";
//x
if ($file->saveAs($filename)) {
//read file...
$fp = fopen($filename, 'r');
return $this->readFile($fp, $account);
} else {
throw new \Exception(Yii('app', 'cannot save bankbook'));
}
}
}