Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i m jagnesh...... i want know

how to execute code which is received from user ....
. Plz help
Posted
Updated 7-Jan-12 8:20am
v3
Comments
theanil 7-Jan-12 14:21pm    
Removed the word urgent
it might be urgent for you not for us
Sergey Alexandrovich Kryukov 7-Jan-12 14:44pm    
It depends on what that code is written for: stand-along PHP, for use on a Web site with PHP support or ASP.NET support (one of the PHP products, Phalanger, targets CLI and is used with CLR).
--SA

1 solution

It depends too much on what that code is made to do.

If the code targets Web application, you need to create some Web application using the code and deploy it on some server using some Web hosting which supports PHP.

It can be a stand-along PHP application. To run it, you need to install PHP: http://www.php.net/[^].

Now, let's come back to the Web application. Alternatively, you can host and run a Web application with PHP on your local computer. The easiest way to do this is this: 1) install PHP; 2) install Apache HTTP server; 3) install the Apache "module" mod_php on your Apache server and configure it to use PHP installed on the first step. Normally, mod_php is a standard option included in Apache installation.

See:
http://en.wikipedia.org/wiki/Apache_HTTP_Server[^],
http://httpd.apache.org/[^]

One remote alternative is this: you can run and debug (some) PHP codes in .NET and/ore ASP.NET Web site. The easiest way to do it is Microsoft Visual Studio which already provides a development HTTP server which is ASP.NET enabled and configured properly. On top of that, you need to install Phalanger and Plalanger Visual Studio integration add-on.

See:
http://en.wikipedia.org/wiki/Phalanger_%28compiler%29[^],
http://www.php-compiler.net/[^].

—SA
 
Share this answer
 
Comments
thatraja 7-Jan-12 17:16pm    
5!
Sergey Alexandrovich Kryukov 7-Jan-12 17:27pm    
Thank you, Raja.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900