> -----Original Message-----
> From: David Robley [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 23 July 2002 10:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: does this mean ....
>
>
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> 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"



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to