Re: php variables in a backtick command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quotes are only for the shell command which does not use quotes around 
password.  Thanks for the feedback.

Jonathan


"Sebastian" <sebastian@xxxxxxxxxxxxxxxxxxx> wrote in message 
news:004101c4dfeb$6a71d490$77a13f44@xxxxxxxxx
> well $user['password'] has no double quotes around it.
>
> ----- Original Message ----- 
> From: "Jonathan Duncan" <jonathan@xxxxxxxxxx>
> To: <php-general@xxxxxxxxxxxxx>
> Sent: Saturday, December 11, 2004 8:09 PM
> Subject:  php variables in a backtick command
>
>
>> I am trying to run a shell command with backticks.  However, I get a 
>> parse
>> error.  Is it because I have an array variable in there?
>>
>> $result =
> `adduser -l=$dist_id -p=$user['password'] --f="$user['name_first']
>> $user['name_last']"`;
>>
>> Do I need to assign the value to a regular variable before I put it in
>> there?  Like this?
>>
>> $pword=$user['password']
>> $fname =$user['name_first']
>> $lname =$user['name_last']
>> $result = `adduser -l=$dist_id -p=$pword --f="$fname $lname"`;
>>
>> Thanks,
>> Jonathan
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> 

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux