jaymc Posted February 1, 2007 Share Posted February 1, 2007 I have a linux server and Im trying to make a php page that will display the current top tried.. echo system('top'); But it doesnt work.. Any ideas why? Safe mode is off. Link to comment https://forums.phpfreaks.com/topic/36631-system/ Share on other sites More sharing options...
Ninjakreborn Posted February 1, 2007 Share Posted February 1, 2007 Don't ever use system, unless it's absolutely contained. YOU need either require, require_once, include, or include_once. Link to comment https://forums.phpfreaks.com/topic/36631-system/#findComment-174546 Share on other sites More sharing options...
trq Posted February 1, 2007 Share Posted February 1, 2007 Im afraid require* and include* are of absolutely no use in this situation. <?php echo shell_exec('top'); ?> Link to comment https://forums.phpfreaks.com/topic/36631-system/#findComment-174574 Share on other sites More sharing options...
jaymc Posted February 3, 2007 Author Share Posted February 3, 2007 Im afraid require* and include* are of absolutely no use in this situation. <?php echo shell_exec('top'); ?> That doesnt output anything? Link to comment https://forums.phpfreaks.com/topic/36631-system/#findComment-175849 Share on other sites More sharing options...
Hypnos Posted February 3, 2007 Share Posted February 3, 2007 Do phpinfo(); and see if safe mode is on. It needs to be off. Maybe try this way: $output = shell_exec('ls'); print $output; Link to comment https://forums.phpfreaks.com/topic/36631-system/#findComment-175852 Share on other sites More sharing options...
jaymc Posted February 6, 2007 Author Share Posted February 6, 2007 THat works.. safemode is off Can anyone actually get this TOP working on there own servers via php? Link to comment https://forums.phpfreaks.com/topic/36631-system/#findComment-177876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.