php - How do I evaluate from a textarea? -


here's tried:

<form method="post" action="new.php">      <font color="#c0c0c0"><small>it doesn't highlight still works. , feel free resize it!</small></font><br />      <textarea name="high" class="prettyprint">insert code here</textarea><br />       <button class="btn btn-large btn-success" type="submit">debug</button>      </form>      </center>       <h1>debug info:</h1>      <pre><?php if(isset($_post['high'])){      $high = (get_magic_quotes_gpc()) ? stripslashes($_post['high']) : $_post['high'];      eval($high);            }?></pre> 

i need evaluate code textarea executes php code (i put echo 'hi' in textarea , gives error:) parse error: syntax error, unexpected '<' in /home/a3827523/public_html/new.php(44) : eval()'d code on line 1

i don't know problem can help?

(i put echo 'hi' in textarea , gives error:)

because miss ";" @ end of line

--

additional: tried code in environment, got same error in these 2 case below:

case 1 in textarea begin code php tag:

<?php     echo 'hi';  ?> 

php manual wrote:

mixed eval ( string $code_str )

the code string evaluated. code_str not have contain php opening tags.

case 2 syntax error code in textarea:

echo 'hi' 

semicolon missing.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -