//********************my.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="freiza" /> <title>Untitled 2</title> </head> <body> <?php print "<form action='run.php' method='get' enctype='text/plain'> <input type=\"text\" name=\"one\" /> <input type=\"submit\" /> </form> "; ?> </body> </html> //********************************run.php <?php /** * @author freiza * @copyright 2010 */ print $_GET['one']." world"; ?> Code (markup): when i execute i get hello world... Is there any way that i can get only hello and omit "world" without modifying run.php
Strange request, but possible. Add this to the very top: <?php ob_start(); ?> Code (markup): And then this to the very bottom (under 'run.php'): <?php echo substr_replace(ob_get_clean(), '', -7); ob_end_clean(); ?> Code (markup):
but i already mentioned not to touch run.php in anyway. it would be rather easy to omit the word "world" . if run.php were to be accessed. thanx..(I am happy)... But please find a way...(urgent)