note 52345 deleted from function.shell-exec by nlopess
| From: | nlopess@php.net | Date: | Sun, 01 May 2005 08:22:33 +0000 |
| Subject: | note 52345 deleted from function.shell-exec by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-88819@lists.php.net to get a copy of this message | ||
Note Submitter: jonybd at yahoo dot com
----
Jony,
Following is the code where you can use for any executables
i used it for apache .htaccess file , individual user and root user.
<?php
/***********************************
* Variable received by request
**********************************/
$v_UNAME = $_GET["user"];
$v_UPASS = $_GET["pass"];
$v_PFILE = '"C:\Program Files\Apache Group\Apache2\conf\passwords"';
/***********************************
* Processing add/edit/delete
**********************************/
$stdout = shell_exec('htpasswd -b ' .$v_PFILE .' ' .$v_UNAME .' '
.$v_UPASS);
/***********************************
* redirect to somepage
**********************************/
header("location: changed.htm");
?>