How can I ensure a PHP class is found when compiling Haxe?

末鹿安然 提交于 2020-03-03 08:47:09

问题


I am compiling a UFront application which worked prior to Haxe 3.4. After upgrading it started generating this error when using remoting:

PHP Fatal error: Class 'haxe__Unserializer_DefaultResolver' not found…site/ufront/www/lib/haxe/Unserializer.class.php on line 554

As a temporary fix I inserted this statement at the top of that file:

require '_Unserializer/DefaultResolver.class.php';

Obviously that will disappear the next time I compile. How can I ensure that PHP finds the DefaultResolver class?


回答1:


I solved this by putting these lines in my Server class:

#if php
untyped __php__("require 'haxe/_Unserializer/DefaultResolver.class.php'; ");
#end


来源:https://stackoverflow.com/questions/45599210/how-can-i-ensure-a-php-class-is-found-when-compiling-haxe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!