Need Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • funkychicken818@gmail.com

    Need Help

    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.

  • Tim Van Wassenhove

    #2
    Re: Need Help

    On 2006-05-21, funkychicken818 @gmail.com <funkychicken81 8@gmail.com> wrote:[color=blue]
    > 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?[/color]

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

    --
    Met vriendelijke groeten,
    Tim Van Wassenhove <http://timvw.madoka.be >

    Comment

    • Chung Leong

      #3
      Re: Need Help

      funkychicken818 @gmail.com wrote:[color=blue]
      > 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.[/color]

      Defining a stream wrapper is one way to do this.

      Comment

      • flconseil@yahoo.fr

        #4
        Re: Need Help

        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 !

        Comment

        • funkychicken818@gmail.com

          #5
          Re: Need Help

          I Don't really understand how stream_wrapper_ register(), or Streams
          can help me with my problems could you please explain?

          Comment

          Working...