T_PAAMAYIM_NEKUDOTAYIM이 실제로 이국적인 소리를 지지만, 확실히 확실히 나에게는 넌센스입니다. 이 코드 줄까지 모두 추적했습니다.이것은 무엇을 의미합니까? "구문 분석 오류 : 예기치 않은 T_PAAMAYIM_NEKUDOTAYIM 구문 오류"
<?php
Class Context {
protected $config;
public function getConfig($key) { // Here's the problem somewhere...
$cnf = $this->config;
return $cnf::getConfig($key);
}
function __construct() {
$this->config = new Config();
}
}
?>
생성자에서 구성 개체를 만듭니다. 여기에 클래스의 :
final class Config {
private static $instance = NULL;
private static $config;
public static function getConfig($key) {
return self::$config[$key];
}
public static function getInstance() {
if (!self::$instance) {
self::$instance = new Config();
}
return self::$instance;
}
private function __construct() {
// include configuration file
include __ROOT_INCLUDE_PATH . '/sys/config/config.php'; // defines a $config array
$this->config = $config;
}
}
오류가 무엇을 의미하는지이 나던 일/...
가능한 중복 [PHP는 T 기대 \ _PAAMAYIM \ _NEKUDOTAYIM?] (http://stackoverflow.com/questions/592322/php-expects-t-paamayim-nekudotayim) –