1

I have 5 PHP files that i want to browse locally (without using internet). Only one is actually called, but it needs the other 4 to be functional (seems to be a bit like an exe and 4 dlls, but I dont't have much knowledge in PHP...). If i put all the files into a single one, and load the stream into NavigateToStream/String, it starts reading it right, but then when it is supposed to wait for the user to upload a file, it just displays the rest of the code without interpreting it.

So I'm looking for a way to load the 5 PHP files separately, while allowing them to work together in a WebBrowser (if that is possible).

Thanks!

1 Answer 1

2

PHP code on its own is nothing but text; it needs to be interpreted by the PHP runtime in order to be executed. This usually works in the context of a web server that has a PHP plugin/extension. It's the server's job to interpret the code, while the client only receives HTML and communicates with the server by HTTP.

So your best bet is to install the PHP files in a properly configured web server (either local or hosted somewhere external) and browse to it. I suppose you could try to invoke the PHP runtime to interpret the script, however I have no idea how to actually go about doing that. The PHP runtime exists in several versions, for different sever plugin architectures, and basically it accepts PHP code and returns HTML code, but the entire structure is much more complicated, accounting for cookies, server environment etc. etc. so I'd look for simpler solutions first. If the scripts are not extremely complicated, it might be a better idea to port them to c# code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.