By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,854 Members | 849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,854 IT Pros & Developers. It's quick & easy.

Need Help

P: n/a
hello i am going to remake my site and well i want to place all my code
in a database were i can access the code and output, just how can i
make it so when i access this code it outputs exactly the same way it
would if i were just putting it in a regular php file?
how i can do this?

oh and made this
<?php
$hello="<?php
echo 'hello my name is sam';
?>";
?>
<?php
$hello
?>
can some one help me make it work, because it would save me lots of
time, thanks.

May 21 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 2006-05-21, fu*************@gmail.com <fu*************@gmail.com> wrote:
hello i am going to remake my site and well i want to place all my code
in a database were i can access the code and output, just how can i
make it so when i access this code it outputs exactly the same way it
would if i were just putting it in a regular php file?


If i get it right, http://www.php.net/eval is all you need.

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>
May 21 '06 #2

P: n/a
fu*************@gmail.com wrote:
hello i am going to remake my site and well i want to place all my code
in a database were i can access the code and output, just how can i
make it so when i access this code it outputs exactly the same way it
would if i were just putting it in a regular php file?
how i can do this?

oh and made this
<?php
$hello="<?php
echo 'hello my name is sam';
?>";
?>
<?php
$hello
?>
can some one help me make it work, because it would save me lots of
time, thanks.


Defining a stream wrapper is one way to do this.

May 21 '06 #3

P: n/a
Yes, a stream wrapper is the only way to get exactly the same as if it
was read from a regular file.

Look at the example in the documentation of stream_wrapper_register(),
remove the write method, and you have got nearly everything you need !

May 22 '06 #4

P: n/a
I Don't really understand how stream_wrapper_register(), or Streams
can help me with my problems could you please explain?

May 23 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.