Blah_ Posted February 25, 2008 Share Posted February 25, 2008 I have a variable with php coding in it that I want to compile instead of it just showing source code when I echo it, please help ,Thanks Link to comment https://forums.phpfreaks.com/topic/92840-compile-a-variable/ Share on other sites More sharing options...
Steve Angelis Posted February 25, 2008 Share Posted February 25, 2008 Can you show the code? Link to comment https://forums.phpfreaks.com/topic/92840-compile-a-variable/#findComment-475586 Share on other sites More sharing options...
Blah_ Posted February 25, 2008 Author Share Posted February 25, 2008 I would but I get a forum error when I try Forbidden You don't have permission to access /forums/index.php on this server. Link to comment https://forums.phpfreaks.com/topic/92840-compile-a-variable/#findComment-475594 Share on other sites More sharing options...
PFMaBiSmAd Posted February 25, 2008 Share Posted February 25, 2008 To execute php code contained in a string, you must use the eval() function. Make sure that the code is from a trusted source as any code input by a visitor could be used to take over your site, deposit a Trojan horse script on your server, or send spam through your mail server... Link to comment https://forums.phpfreaks.com/topic/92840-compile-a-variable/#findComment-475596 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.