Join Up!
104887 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousescapeshellargexecnext
Last updated: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Finnish | German | Spanish

escapeshellcmd

(PHP 3, PHP 4 )

escapeshellcmd -- escape shellovské metaznaky

Popis

string escapeshellcmd ( string command)

EscapeShellCmd() oescapuje všechny znaky v řetězci, které by se daly použít ke zneužití shellového příkazu k vykonání libovolných příkazů. Tato funkce by se měla používat k zabezpečení toho, aby všechna data pocházející z uživatelského vstupu byla oescapována přetím, než budou předána funkci exec() nebo system(), nebo backtick operátoru. Standardní použití:

$e = EscapeShellCmd($userinput);
system("echo $e"); // tady nás nezajímá, jestli jsou v $e mezery
$f = EscapeShellCmd($filename);
system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); // a tady ano, proto použijeme uvozovky

Viz takéescapeshellarg(), exec(), popen(), system(), a backtick operátor.

User Contributed Notes
escapeshellcmd
add a note about notes
There are no user contributed notes for this page.
previousescapeshellargexecnext
Last updated: Sun, 27 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST