note 87213 added to function.eval
| From: | geek dot de at gmail dot com | Date: | Tue, 25 Nov 2008 04:31:04 +0000 |
| Subject: | note 87213 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146899@lists.php.net to get a copy of this message | ||
in response to samme at vimio
and warning for all using
<?php
eval('?'.'>'. $variable .'<'.'?php');
?>
In my version of PHP at least (5.2.5 windows), this just wouldn't work because you have to add
another ' ' (space) after the php opening tag, as such:
<?php
eval('?'.'>'. $variable .'<'.'?php ');
?>
It took me the better part of this afternoon to figure this out. So be warned!
It seems like this is because the next php statement after that is appended resulting in something
like:
? >hello world< ?phpdie('asd');
----
Server IP: 202.89.58.1
Probable Submitter: 203.114.137.9
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- https://master.php.net/note/edit/87213
Del: integrated -- https://master.php.net/note/delete/87213/integrated
Del: useless -- https://master.php.net/note/delete/87213/useless
Del: bad code -- https://master.php.net/note/delete/87213/bad+code
Del: spam -- https://master.php.net/note/delete/87213/spam
Del: non-english -- https://master.php.net/note/delete/87213/non-english
Del: in docs -- https://master.php.net/note/delete/87213/in+docs
Del: other reasons-- https://master.php.net/note/delete/87213
Reject -- https://master.php.net/note/reject/87213
Search -- https://master.php.net/manage/user-notes.php