PHPからUSERADDを実行する
$id = "username";
$passwd = crypt("passwd");
$cmd = "echo 'sudoPasswd' | sudo -S useradd -p $passwd $id";
exec($cmd, $output);
ROOTディレクトリを表示
//ls -a /root
$cmd2 = "echo…
$string = ‘Hello World!’;
if(stristr($string, ‘earth’) === FALSE) {
echo ‘”earth” not found in string’;
}
// 出力は “earth” not found in string となります
参照元:http://www.php.net/manual/ja/function.stristr.php
graffiti on the web
この投稿へのコメント
コメントはまだありません。