escapeshellcmd
������� shell �����������.
��������� :
string escapeshellcmd(string command);
������� ����� ������� � ������, ������� ����� ���� ������������ � ��������� �������������� ��� ������������ �������. ��� ������� ����� ������������, ��� �� ��������, ��� ��� ���� ������ ������� ���������, � ��� ������� ����� ����� ��������� � ������� exec() ��� system(). ����������� ������������� ���� ������� �������� ���:
system(EscapeShellCmd($cmd))
������� shell �����������.
��������� :
string escapeshellcmd(string command);
������� ����� ������� � ������, ������� ����� ���� ������������ � ��������� �������������� ��� ������������ �������. ��� ������� ����� ������������, ��� �� ��������, ��� ��� ���� ������ ������� ���������, � ��� ������� ����� ����� ��������� � ������� exec() ��� system(). ����������� ������������� ���� ������� �������� ���:
system(EscapeShellCmd($cmd))
exec
������ ������� ���������.
��������� :
string exec(string command [, string array [, int return_var]]);
������� exec() ������ �� ������������ ��������� ��������� �� ������ command, ���� ����������� ����� ��������. ���������� ��������� ������ ���������� ���������� ���������.
���� �������� array ����������, �� ��������� ������ ����� �������� ������� �� ���������. �������, ���� ������ ��� �������� ������, �� exec() ��������� ���� ������ � ����� �������. ��� ������� ������� ����� ������������ ������� unset().
���� �������� return_var ���������� ������ � ���������� array, �� � ���� ������������ ��������� ���������� �������.
������ ������� ���������.
��������� :
string exec(string command [, string array [, int return_var]]);
������� exec() ������ �� ������������ ��������� ��������� �� ������ command, ���� ����������� ����� ��������. ���������� ��������� ������ ���������� ���������� ���������.
���� �������� array ����������, �� ��������� ������ ����� �������� ������� �� ���������. �������, ���� ������ ��� �������� ������, �� exec() ��������� ���� ������ � ����� �������. ��� ������� ������� ����� ������������ ������� unset().
���� �������� return_var ���������� ������ � ���������� array, �� � ���� ������������ ��������� ���������� �������.
<?php $se = "dir c:\\"; $s0 = exec($se, $sa, $sr); echo "��� ������� ������� "$se" ��������� ���������� ������ ����:\n", $s0,"\n ��� �������� ($sr) \n� ��� ��� ��� ���� ��������: "; print_r($sa); ?>���� ��������� ��������� ��������� � ������� ������ (�� ���������� �����), �� ����� �� ������ ������ ���� ������������� � ���� (��� ���� ����� ������); ����� �� ��������� ����������� ������� ���������� �������� (�������� ���������� ������� ���������) �� ����� ������������� �������� � �������.
system
������ ������� ��������� � ������� ����������.
��������� :
string system(string command, int [return_var]);
��� ������� ��� ������� command � ������ ����������. ���� ������������ ������ ��������, �� � ���� ������������ ��������� ���������� �������.
����� System() ����� ������� ������������� �������� � ����� ������ web ������� ����� ������ ������ ������, ���� PHP ������� ��� ������ �������.
������ ������� ��������� � ������� ����������.
��������� :
string system(string command, int [return_var]);
��� ������� ��� ������� command � ������ ����������. ���� ������������ ������ ��������, �� � ���� ������������ ��������� ���������� �������.
����� System() ����� ������� ������������� �������� � ����� ������ web ������� ����� ������ ������ ������, ���� PHP ������� ��� ������ �������.
passthru
��������� ������� ��������� � ������� ������ ��������.
��������� :
string passthru(string command [, int return_var]);
������� passthru() ������ �� ������� exec() ��� ������� command. ���� �������� return_var ����������, �� ��������� Unix ������� ���������� �����. ��� ������� ������ �������������� ������ exec() ��� system() �����, ����� ����� �� Unix ������� �������� ��������� �������, ������� ������ ���� �������� ��������������� ������� � ���� ���������(browser). ��� ����� ������������, ��������, ��� ������� ������� pbmplus ��� ������ ��������������� ������ �����������. ��������� ���� image/gif � ����� ��������� pbmplus, ����� ������� gif-�������, �� ������ ��������� PHP �������, ������� ������� ����������� ���������������.
��������� ������� ��������� � ������� ������ ��������.
��������� :
string passthru(string command [, int return_var]);
������� passthru() ������ �� ������� exec() ��� ������� command. ���� �������� return_var ����������, �� ��������� Unix ������� ���������� �����. ��� ������� ������ �������������� ������ exec() ��� system() �����, ����� ����� �� Unix ������� �������� ��������� �������, ������� ������ ���� �������� ��������������� ������� � ���� ���������(browser). ��� ����� ������������, ��������, ��� ������� ������� pbmplus ��� ������ ��������������� ������ �����������. ��������� ���� image/gif � ����� ��������� pbmplus, ����� ������� gif-�������, �� ������ ��������� PHP �������, ������� ������� ����������� ���������������.