PhpSnip.com

User Stats

Non-broken EscapeShellCmd()

This is a safe way of passing command-line arguments to child processes.

Info

 Download  View Source (print view)
 Rating : 4.7  Views : 861

Source Code ( 3 lines )

function EscapeShellArg($x) {
  return "'".ereg_replace("'", "\'", $x)."'";
}

Search

Subscribe

  Rss Feeds

Sponsors

Advertise