related to my .htgroup question...

From: Date: Thu, 01 Mar 2001 18:19:34 +0000
Subject: related to my .htgroup question...
Groups: php.general 
Request: Send a blank email to php-general+get-42203@lists.php.net to get a copy of this message
Heh...I'm a list frequenter today... Ok, so I want to be able to do some things with php. 1) add a user to the .htpasswd file I know I can use exec() to run commands on the server. The problem here is that when I do "htpasswd .htpasswd username" I get prompted for passwords twice. How the heck can I do that with php? Will this work (I just thought of this right now...): exec("htpasswd& .htpasswd username"); exec("password"); exec("password"); If this works, that would be great. I would assume that after this, the program stops and I don't have something running in the background. 2&3)edit the .htgroup and .htaccess files I have no idea how to do this at all whatsoever. I don't want the person running this script to have to see or touch the file at all, but I'm thinking that I'm going to have to, like, read the file into a textarea and make the user edit it and then save it again. That's going to be a pain in the butt when the user is office personnel that doesn't know this stuff from french. Throughtout this all, I don't want any output. I just want the scripts to run and then redirect back to the page it was submitted from. Whew...any ideas? I'm not going to have to learn perl just for this am I? ;^) Thanks a bunch Jason

« previous php.general (#42203) next »