Can I use the PHP DOTNET function?

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I'm a .NET developer and usually I wrote apps/services that can run under Linux using Mono.
Today I started using DOTNET php function and I was able to use it on Windows/Apache:

https://forum.tuteehub.com/tag/try">try{
    $csclass = new DOTNET("CSharpCOM, Version=1.0.0.0, Culture=neutral, ".
                          "PublicKeyToken=beb607ae770fhttps://forum.tuteehub.com/tag/5">57https://forum.tuteehub.com/tag/5">50",
                          "CSharpCOM.CSharpCOMClass");
    echo $csclass->Base64("Io mi chiamo Marco Giacinti"),"\n";
    echo $csclass->Random2(10,20),"\n";
    echo $csclass->Random1(https://forum.tuteehub.com/tag/5">5),"\n";
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
}
?>

where CSharpCOM.CSharpCOMClass is a DLL developed with Framework 3.5 and installed in GAC using gacutil -i path\CSharpCOMClass.dll.
When I save this script as dotnet.php and navigate to http://localhost/dotnet.php Apache respond with

HTTP https://forum.tuteehub.com/tag/5">500 internal error

Is there any way to use DOTNET php https://forum.tuteehub.com/tag/function">function on Ubuntu?

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.