Github user oprudkyi commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1013#discussion_r64140128
--- Diff: tutorial/haxe/src/Main.hx ---
@@ -51,14 +51,44 @@ class Main {
private static var targetPort : Int = 9090;
static function main() {
- #if ! (flash || js)
+
+ #if ! (flash || js || phpwebserver)
try {
ParseArgs();
} catch (e : String) {
trace(e);
trace(GetHelp());
return;
}
+
+ #elseif phpwebserver
--- End diff --
also, just sample how it looks in a real server
php side:
```php
<?php
namespace App\Libs\Tsp;
function tsp_trace_function($message)
{
\Log::info($message);
}
require_once dirname(__FILE__) .
'/../../../tsp_handler_web/tsp_web_handler.php';
```
haxe side:
```haxe
static public function main()
{
//remap trace
haxe.Log.trace = function(v:Dynamic, ?infos:haxe.PosInfos)
{
....
untyped __call__('App\\Libs\\Tsp\\tsp_trace_function',
'${msg}${newValue}');
}
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---