私はionCube(ver. 8.3)を使ってsmartyライブラリファイルを含む.tpl,.phpファイルを暗号化しました.すべての難読化オプションをチェックしてそれらを正常にエンコードでき、キーファイルも生成できます. しかし、index.phpページを開こうとすると、次のエラーが表示されます...
致命的なエラー: C:\cc\htdocs\App_Encode\Smarty\libs\Smarty.class.php: 0 スタック トレース: #0 C:\cc\htdocs\App_Encode\Smarty\libs\Smarty.class.php(0): 難読化 #1 C:\cc\htdocs\App_Encode\index_standard_creation.php(0): 不明() #2 {main} が C:\cc\htdocs\App_Encode\Smarty\libs\Smarty.class.php の 0 行目にスローされる
ionCube が提供するパッチは Smarty 2.* 用です。私はSmarty 3.1.18バージョンとPHP Ver. を使用しているためです。5.5 ...
PHPプログラミングは初めてなので、どこに問題があるのか 理解できません。\libs\plugins\smarty_internal_resource_file.php の getContent() 関数で次のパッチを試しました..しかし、それは役に立ちません:(
public function getContent(Smarty_Template_Source $source)
{
if ($source->timestamp) {
if (function_exists('ioncube_read_file')) {
return ioncube_read_file($source->filepath);
} else {
return file_get_contents($source->filepath);
}
}
if ($source instanceof Smarty_Config_Source) {
throw new SmartyException("Unable to read config {$source->type} '{$source->name}'");
}
throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
}
私を助けてください!!