Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 PHP Code: Online PHP Tester Jump to:  
Category: >> PHP Code >> Online PHP Tester Bookmark and Share

<< lastnext >>

Snippet Name: Online PHP Tester

Description: Online PHP Tester- this lets you test arbitrary PHP code from a browser.

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009

<?PHP 
 
// This code creates two frames. The left frame is a textarea that you can write 
// PHP code in and execute it. On the right frame you will see the result of the 
// code that was executed. 
 
// If you intend to check this make sure you call your file : generate.php or 
// change it's name in the code 
 
 
/* -BEGIN PHP TESTER */ 
 
FUNCTION generateFrames() { 
ECHO "<FRAMESET COLS=\"660,*\">\n"; 
ECHO "<FRAME NAME=\"input\" SRC=\"generate.php?page=left\">\n"; 
ECHO "<FRAME NAME=\"output\" SRC=\"generate.php?page=right\">\n"; 
ECHO "</FRAMESET>"; 
} 
 
IF($page=="left") { 
ECHO "<BODY BGCOLOR=\"#FFFFFF\">"; 
ECHO "<FONT FACE=\"Arial,Verdana,Helvetica\" COLOR=\"FF0000\" SIZE=\"3\">PHP Tester</FONT>"; 
ECHO "<FORM METHOD=\"post\" ACTION=\"generate.php?page=right\" TARGET=\"output\">\n"; 
ECHO "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"; 
ECHO "<TR><TD><TEXTAREA NAME=\"input\" COLS=\"100\" ROWS=\"40\" 
WRAP=\"virtual\">".$input."</TXTAREA></TD></TR>\n"; 
ECHO "<TR><TD ALIGN=\"center\"><INPUT TYPE=\"submit\" 
VALUE=\"Execute\"></TD></TR></TABLE></FORM>\n"; 
ECHO "</BODY>"; 
} 
 
ELSE IF ($page=="right") { 
ECHO "<BODY BGCOLOR=\"#FFFFFF\">"; 
IF(EMPTY($input)) { 
ECHO "Ready to parse..."; 
} 
ELSE { 
$input=STRIPSLASHES($input); 
EVAL($input); 
} 
ECHO "</BODY>"; 
} 
 
ELSE { 
generateFrames(); 
 
} 
 
/* END PHP TESTER */ 
 
?>
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 239 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?