RE: [PHP] Re: does this mean ....

From: Date: Tue, 23 Jul 2002 00:56:42 +0000
Subject: RE: [PHP] Re: does this mean ....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108994@lists.php.net to get a copy of this message
> -----Original Message----- > From: David Robley [mailto:robleyd@paradise.net.nz] > Sent: Tuesday, 23 July 2002 10:41 AM > To: php-general@lists.php.net > Subject: [PHP] Re: does this mean .... > > > In article <DPEPKCNEFOKBCNNANCIPMEINCGAA.php@vfsa.com.au>, > php@vfsa.com.au > says... > > hi all, > > > > I'm tring to make a script to prompt for a username & then a password = > > for that user onto the actual machine rather than just a web site... > > > > now i've come across this this line in some documentation > > > > if ( $File =3D popen( "$useradd_prog $useradd_name", "r" ) ) > > { > > . > > . > > . > > now to my actual question .. > > > > does that "r" just mean read? and if so should that "r" be a > > "w" for = > > write in order for it to work? > > > > > > > > Cheers=20 > > > > Peter=20 > > "the only dumb question is the one that wasn't asked"=20 > > =20 > > If you are just checking the name/password against an existing list, then > you only need read. If you want to add something, then you need a > different mode. > > However, I think you may be better off uing fopen, instead of popen, if > you are trying to do what I think you are. The documentation for > fopen has > a comprehensive description of the modes available; note that w is kindof > destructive in the wrong context :-) > > Cheers > -- > David Robley > Temporary Kiwi! > > Quod subigo farinam > i'm tring to run the useradd command (under Solaris) to add a user to the system so i don't have to continueously remote log in and also make it easier for myself to add users to the system(s).. maybe popen isn't the best option for this .. though i don't think fopen will be able to do what i need it to do.. maybe playing around with sockets would be better? Cheers Peter "the only dumb question is the one that wasn't asked"

« previous php.general (#108994) next »