This article describes the implementation of the PHP online implementation method. Share to everyone for your reference, specific as follows:
The screenshot of the running effect is as follows:
run.php files are as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
run2.php files are as follows:
<?php
$code = stripslashes ($_post[' php_code '));
if (!strstr ($code, ' <?php '))
$code = ' <?php '. Php_eol. $code;
File_put_contents (' run3.php ', $code);
Header ("location:./run3.php");
Full instance code click here to download the site.
More about PHP Interested readers can view the site topics: "PHP Regular Expression Usage Summary", "Php+ajax Skills and Application Summary", "PHP operation and operator Usage Summary", "PHP Network Programming Skills Summary", "PHP basic Grammar Introductory Course", " PHP Operations Office Document Tips summary (including word,excel,access,ppt), "PHP Date and Time usage summary", "PHP Introduction to Object-oriented Programming", "PHP string (String) Usage Summary", "php+ MySQL Database operations Introduction tutorial and PHP Common database operation Skills Summary
I hope this article will help you with the PHP program design.