简体   繁体   中英

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

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM