hackalive Posted April 2, 2010 Share Posted April 2, 2010 Hi guys, I have a PHP variable $var which is "$header = 'http://'.$_SERVER['HTTP_HOST'].'/'; header("location: $header");" now some how in my php file I need to execute this variable as PHP any ideas, all help is much appreciated Link to comment https://forums.phpfreaks.com/topic/197376-execute-variable-as-php/ Share on other sites More sharing options...
hackalive Posted April 2, 2010 Author Share Posted April 2, 2010 or sometimes it might just be "echo $_SERVER['HTTP_HOST'];" Link to comment https://forums.phpfreaks.com/topic/197376-execute-variable-as-php/#findComment-1035962 Share on other sites More sharing options...
hackalive Posted April 2, 2010 Author Share Posted April 2, 2010 FYI: I have tried exec() with no luck Link to comment https://forums.phpfreaks.com/topic/197376-execute-variable-as-php/#findComment-1035982 Share on other sites More sharing options...
mikesta707 Posted April 2, 2010 Share Posted April 2, 2010 eval() but if you are executing user input, thats not such a good idea Link to comment https://forums.phpfreaks.com/topic/197376-execute-variable-as-php/#findComment-1035992 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.