hyuuga Posted July 16, 2010 Share Posted July 16, 2010 helo i need help . how to execute the command such as " bash heritrix.sh" via webpage. how to run terminal using php.? Quote Link to comment https://forums.phpfreaks.com/topic/207909-to-execute-command-via-webpage/ Share on other sites More sharing options...
premiso Posted July 16, 2010 Share Posted July 16, 2010 exec or system as long as the file is on the server and the server allows such actions to be taken. Quote Link to comment https://forums.phpfreaks.com/topic/207909-to-execute-command-via-webpage/#findComment-1086871 Share on other sites More sharing options...
hyuuga Posted July 16, 2010 Author Share Posted July 16, 2010 i need to run command " bash heritrix.sh" in terminal for start up the heritrix tools. i want to run the command without open the terminal. do you have any idea how to start up the heritrix by click the button in webpage without open the terminal? Quote Link to comment https://forums.phpfreaks.com/topic/207909-to-execute-command-via-webpage/#findComment-1086926 Share on other sites More sharing options...
trq Posted July 16, 2010 Share Posted July 16, 2010 Did you look at the links in the previous post? Quote Link to comment https://forums.phpfreaks.com/topic/207909-to-execute-command-via-webpage/#findComment-1087004 Share on other sites More sharing options...
hyuuga Posted July 20, 2010 Author Share Posted July 20, 2010 yes is do.. but i'm not so good in php.. can you give me a guide step by step how to do it.. thanks you Quote Link to comment https://forums.phpfreaks.com/topic/207909-to-execute-command-via-webpage/#findComment-1088446 Share on other sites More sharing options...
inversesoft123 Posted July 20, 2010 Share Posted July 20, 2010 if { file_exists("/bin/bash/heritrix.sh") echo "File exists and ready to execute." } else { echo "Wooops! File is missing."; } if { is_executable("/bin/bash/heritrix.sh") echo "And File is executable" exec ("/bin/bash/heritrix.sh", &$output); } else { echo "File is not executable."; } Quote Link to comment https://forums.phpfreaks.com/topic/207909-to-execute-command-via-webpage/#findComment-1088456 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.