I am interested if it is posible to use PHP to run external .exe files,and another thing,I am interested if there is any way for PHP/MySQL to execute a C# external file and output it's result.I really could use some heavy C# programing in HTML.If PHP is not the answer please tell me what I can use.
I am interested if it is posible to use PHP to run external .exe files,and another thing, yes, exec(), system(), shell_exec(() I am interested if there is any way for PHP/MySQL to execute a C# external file and output it's result.I really could use some heavy C# programing in HTML.If PHP is not the answer please tell me what I can use. I don't know, but not php
Only way I believe to do that is with a ActiveX control because what your doing really is launching a client-side application and the fact that both .NET and PHP I'm sure have some sort of Security Sandbox where they won't let you have full trust thus not going to let you run a exe from the server.
I think that you might be able to use PHP and C on a windows platform together. But I am just guessing this, never tried, or read something about it... Someone here might have a better answer. Bye
krakjoe is right about exec / system / etc. It should return the output to PHP for you to do what you want with it. I'll expand on JEET's reply a little, too. Firstly, PHP + C is possible. You write a PHP extension in C and then just load it through the PHP.INI file to call from PHP. In exactly the same way that adding the mysql.dll file to PHP.INI allows you to make mysql function calls, your extension would allow you to make the function calls that you need, too. You would do all of the hard work in the C extension and then return the output (or whatever) to PHP. You will need to do some reading up on writing extensions, though. I haven't done it for years but it all came to me in a Eureka moment. It can be tweaked to let you run C++ DLLs, too. You can do this on all platforms that support PHP. If you'll only be running it on Windows, you could look into the W32API extension. It should allow you to 'hook' into your DLLs that way. I've never used it, so I couldn't tell you how easy it is.
TwistMyArm, C# and C are not the same thing. alaric, you need Windows hosting to run .NET apps , so instead of PHP take a look to the ASP.NET - a Microsoft server-side thing.
wmtips, I know that. That's why in my reply I said that I was expanding on what JEET had to say (which although didn't address the question exactly, well, it did provide a bit of information). Anyway, wmtips is right: for the details you've given it's probably easier just to use ASP.NET. I mean it all depends on what exactly you're doing (who knows, there may already be an extension for what you want to do) as well as what percentage of the overall site 'work' will be done inside these apps that you want to call.