note 106021 added to wrappers.data
| From: | senica at gmail dot com | Date: | Mon, 03 Oct 2011 20:20:31 +0000 |
| Subject: | note 106021 added to wrappers.data | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183615@lists.php.net to get a copy of this message | ||
You can use data:// to evaluate php that is stored in mySQL
For example:
If you have code stored that looks like this:
$content = ' //Content from your database or variable
<?php if($var == "something"): ?>
print this html
<?php endif; ?>
';
Trying to evaluate this can prove cumbersome
But you can do something like:
include "data://text/plain;base64,".base64_encode($content);
and it will parse it with no problems.
----
Server IP: 69.147.83.197
Probable Submitter: 41.238.202.206
----
Manual Page -- http://www.php.net/manual/en/wrappers.data.php
Edit -- https://master.php.net/note/edit/106021
Del: integrated -- https://master.php.net/note/delete/106021/integrated
Del: useless -- https://master.php.net/note/delete/106021/useless
Del: bad code -- https://master.php.net/note/delete/106021/bad+code
Del: spam -- https://master.php.net/note/delete/106021/spam
Del: non-english -- https://master.php.net/note/delete/106021/non-english
Del: in docs -- https://master.php.net/note/delete/106021/in+docs
Del: other reasons-- https://master.php.net/note/delete/106021
Reject -- https://master.php.net/note/reject/106021
Search -- https://master.php.net/manage/user-notes.php