HEScript - using php function inside hescript

servage2

New member
Hi,
Is it possible to use php functions in hescript?
I need base64_encode for now, but don’t know how to use it in hescript

Thank you
 
Maybe you could think about add posibility to use internal php.exe because it is just compiled. It could be simple one line commands, but it helps us a lot, because no one is hescript experts 🙂

php -r ‘echo base64_encode(“something”);’
 
Please check if in hescript could call script inside compiled application and if return from this script can be assign to hescript variable. It could be powerfull.

Pseudocode
SomeVariable := PHP(‘tools.php?var=’ + getglobalvar(‘something’);
 
We added the ability to run PHP code in HEScript thanks to the new ExecutePHPScript function.
Example code:
Code:
procedure TestRunScript;
var
 SRes: String;
begin
 SRes := ExecutePHPScript("<?php echo 'TEST'; ?>");
 ShowMessage(SRes);

end;
 
great, I can not wait for the new version 🙂

Can we run php script and output assing to SRes? and how to do is?
Code:
procedure TestRunScript;
var
  SRes: String;
begin
  SRes := ExecutePHPScript("<?php include("test.php") ?>");
  ShowMessage(SRes);
end;
 
Last edited:
It will normally work provided that test.php lies in the application’s root folder (the source folder).
 
Back
Top