【发布时间】:2018-04-10 17:25:36
【问题描述】:
我的站点中有一个带有 Flash 的页面,但我遇到了问题。 当我尝试直接执行文件 site.com/amfphp/gateway.php 时,我收到此错误:
致命错误:带有消息的未捕获异常“VerboseException” '不应调用非静态方法 CharsetHandler::setMethod() 静态地,假设 $this 来自不兼容的上下文' in ....
function service() {
//Set the parameters for the charset handler
CharsetHandler::setMethod($this->_charsetMethod); // the problem point here
CharsetHandler::setPhpCharset($this->_charsetPhp);
CharsetHandler::setSqlCharset($this->_charsetSql);
//Attempt to call charset handler to catch any uninstalled extensions
$ch = new CharsetHandler('flashtophp');
$ch->transliterate('?');
$ch2 = new CharsetHandler('sqltophp');
$ch2->transliterate('?');
我该如何解决这个问题?
【问题讨论】:
-
也许尝试在每个对象上调用该方法?
$ch->setMethod($this->_charsetMethod); -
我会调用它,但是我应该放什么参数
$ch = new ChasetHandler(' HERE ');