Ask Your Question
4

Why does PHP shell exec function work on the command prompt but not on the HTML browser?

asked 2022-09-18 11:00:00 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-07-09 22:00:00 +0000

nofretete gravatar image

The PHP shell exec function runs the command on the server where the PHP script is executed. The command prompt on the server has access to system resources that may not be available on the client's browser. In addition, the HTML browser executes the PHP script on the client-side, and it doesn't have the necessary permissions to execute shell commands. Therefore, PHP shell exec function cannot be executed on the client's browser.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-09-18 11:00:00 +0000

Seen: 8 times

Last updated: Jul 09 '22