나는 배열을 제대로 참조하지 않기 때문에 생각합니다. PHP에 익숙하지 않아서이 오류가 발생했습니다. $this->fields['id'] => &$doc->id;
예기치 않은 T_DOUBLE_ARROW는 배열을 참조 할 때
코드 참조 주어진다이 광고에
는 :<?php
class Zoho{
public $fields;
public function __construct(){
$this->fields = array(
// 'content' => "@/wamp/apps/researchportal/tmp/a.doc",
'apikey' => $this->api_key,
'output' => $this->output,
// 'id' => time(),
// 'filename' => $usr_bin.'[email protected]#$%^&^%$#@'.$usr_doc,
// 'format' => $ext,
'saveurl' => $this->save_url = $save_url,
'mode' => $this->mode
);
}
public function viewDocument(&$doc) {
$this->fields['id'] => &$doc->id;
$this->fields['filename'] => &$doc->doc_name;
$this->fields['format'] => &$doc->doc_ext;
$this->fields['mode']='view';
$this->fields['content']='@'.&$doc->path;
}
}
$document = new Document('C:/wamp/apps/researchportal/tmp/qubee.doc');
$zoho_s = new Zoho('http://133.223.121.12/researchportal/common/save.php');
$zoho->viewDocument();
?>
이중 화살표 '=>'연산자에만 사용 'array()'선언 안에서. 할당을 위해'='사용 –