本文整理汇总了PHP中app\models\Company::readLine方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::readLine方法的具体用法?PHP Company::readLine怎么用?PHP Company::readLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Company
的用法示例。
在下文中一共展示了Company::readLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readIni
public function readIni()
{
//new company
//
//
//get perm from ini
$encoding = "windows-1255";
//$encoding="ibm862";
$ini = $this->iniFile;
if ($fp = fopen($ini, 'r')) {
while ($line = fgets($fp)) {
@($line = iconv($encoding, "UTF-8//IGNORE", $line));
//$line=utf8_encode($line);
$type = substr($line, 0, 4);
//$obj=$this->readline($line,$type);
$obj = true;
if (!$obj) {
//$suc[$type]--;
} else {
//foreach ($obj as &$value)
// if ($encoding=="ibm862")
// $value = iconv("ISO-8859-8", "UTF-8", hebrev(iconv("UTF-8", "ISO-8859-8", $value)));
if ($type == 'A000') {
//Acc Haeder
/* Account Import */
$comp = new Company();
$comp->string = Yii::$app->dbMain->dsn;
$comp->user = Yii::$app->dbMain->username;
$comp->password = Yii::$app->dbMain->password;
/*
$obj["type"]=(int)$obj["type"]+50;
if(isset($accTypeIndex[$obj["type"]]))
$accTypeIndex[$obj["type"]]=$accTypeIndex[$obj["type"]].",".$obj["name"];
else
$accTypeIndex[$obj["type"]]=$obj["typedesc"].":".$obj["name"];
unset($obj["typedesc"]); */
//1405 acc type code
//1406 acc type name
//print_r($obj);//Yii::$app->end();
//$comp->createDb();
$comp->save();
$this->companyId = $comp->id;
$comp->readLine($line, $type);
$this->clearCompany();
//$accIndex[$obj["id"]]=$acc->save();
//get new acc index save old
//$this->companyId=$comp->id;
//echo $this->companyId;
//Yii::$app->end();
unset($comp);
}
}
}
}
}