Results 1 to 4 of 4

Thread: Import php.....

  1. #1
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Import php.....

    Is there a way to import php in a mysql and export it?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes, you can store it as a string then eval() it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello Twey,

    Hey can u give me an example for the same.

    Thanx in advance.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    $code = '<?php echo("Hello!"); ?>';
    $code = mysql_real_escape_string($code);
    mysql_query('insert into table (code) values ("' . $code . '");');
    
    $row = mysql_fetch_array(mysql_query('select code from table where code="' . $code . '" limit 1;'));
    eval($row['code']);
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •