Results 1 to 3 of 3

Thread: Executing PHP from variable

  1. #1
    Join Date
    Nov 2005
    Location
    under your bed
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Executing PHP from variable

    I have a flash file (swf) coded to send post data to a php file. The post data includes php code to execute. Is there a way to execute PHP in a variable other than writing it to another .php file and running it?

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    you would use eval($string);
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #3
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    Yes, you'd use the method Master_script_maker has shown above. Remember, be very careful when eval'ing items. A user maybe able to insert his own PHP in and could even delete your whole site.

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
  •