A
A
Avery0072014-04-03 07:15:32
PHP
Avery007, 2014-04-03 07:15:32

How to implement the possibility of executing PHP-code in the application and subsequent analysis of the result?

There is an application. It is necessary to get a certain piece of PHP code in it, after that you need to enter some values ​​into POST / GET arrays, execute this code and get the result as a string. Next, analyze this string.
Interested in how this can be done? The application will be in JS / C # / Java, the possibility of using .so files is questionable, the language depends on the solution of the issue. How is it possible to implement it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
maxaon, 2014-04-03
@Avery007

Maybe you need a PHP to JAVA interpreter? quercus.caucho.com

V
Vit, 2014-04-03
@fornit1917

I had to somehow make such crutches. We simply put the required php code in a file, before it we added the initialization of the POST / GET arrays with the necessary values ​​\u200b\u200band ran it on the command line, reading stdout.

A
Alexander, 2014-04-03
@SashaSkot

It's not entirely clear what it's about. Do you want the PHP interpreter to generate you an HTML page or what?

J
jane jane, 2014-04-03
@ru_janex

Demo data on the demo server?)
or dig in the direction of frameworks for testing code ..
I came across a current with javascript testing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question