Name

escapeshellcmd

Synopsis

string escapeshellcmd(string command)

Escapes any characters in command that could cause a shell command to run additional commands. When directly passing user input (such as from forms) to the exec( ) or system( ) functions, you should use this function to escape the data to ensure that the argument isn’t a security risk.

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.