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