#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 1999
    Location
    Denmark
    Posts
    83
    Rep Power
    16
    Hello

    Im trying to put my entire homepage into a db (MySql).
    Not a problem if the we talk plain html, but when I want to
    Load a page containing php3...
    I just get all the unprocessed code.

    Do you have any solution?



    ------------------
    regds..
    -ulrik-



    [This message has been edited by Ulrik N (edited January 31, 2000).]
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Amsterdam, the Netherlands
    Posts
    2
    Rep Power
    0
    To me it seems useless to store all php code in the database. You need at least some stored on the file system to extract it from the database ;-). So why don't you put less in the db. If you want to do some dynamic php code construction use the include/require statement (you can feed it with a variable, coming from .....) or use the eval statement for the dynamic stuff.

    Hope this will help.

    ------------------
    Regards,
    Ilja Heitlager
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 1999
    Location
    Denmark
    Posts
    83
    Rep Power
    16
    You are right, but I want to store some of my php code in the db along with my html..


    ------------------
    regds..
    -ulrik-

  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    As Ilja said, you need to use eval() then.

    // assuming $data contains the data from the db

    print eval($data);

Similar Threads

  1. Macro word to extract words according to dictionary
    By pingucain in forum Visual Basic Programming
    Replies: 4
    Last Post: November 10th, 2003, 05:01 AM
  2. Apache2 w/ php4 as DSO.. but I need to revert to php3
    By JunkCookie in forum PHP Development
    Replies: 0
    Last Post: August 11th, 2003, 03:05 PM
  3. Replies: 1
    Last Post: January 21st, 2002, 08:32 AM
  4. PHP3 -> PHP4 - how to reconfigure applications?
    By adam2000 in forum PHP Development
    Replies: 1
    Last Post: December 14th, 2000, 02:00 AM
  5. PHP3 and PHP4 together
    By an_easy_marc in forum PHP Development
    Replies: 1
    Last Post: October 20th, 2000, 05:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo