how to run exec command in php?
My code is so far 

 

      $dn = array("C" => "".trim($_POST['countryname']),
           "ST" => "".trim($_POST['province']),
           "L" => "".trim($_POST['localityname']),
           "O" => "".trim($_POST['organizationname']),
           "OU" => "".trim($_POST['organizationunit']),
           "CN" => "".trim($_POST['commonname']),
           "emailAddress" => "".trim($_POST['email']));
          $str = ''; 
        	foreach($dn as $key => $val){ 
        	$str .= "/$key=$val"; 
        	} 
        	echo $str;

output is:-`"/C=IN/ST=MAHARASHTRA/L=MUMBAI/O=Couffin Inc/OU=Sales/CN=www.couffin.itpl"`

Now, i want to execute `exec()` command in php and save in to this place

#Generating a cert request

openssl req -new -nodes -out /portal/data/config/certificate/vendor/requests/couffin-req.pem -keyout /portal/data/config/certificate/vendor/requests/couffin-req.key -subj "/C=IN/ST=MAHARASHTRA/L=MUMBAI/O=Couffin Inc/OU=Sales/CN=www.couffin.itpl" -config /portal/data/config/certificate/vendor/openssl.cnf

How can i do this `plz help me`
how to run exec command in php?
===

My code is so far 

 

      $dn = array("C" => "".trim($_POST['countryname']),
           "ST" => "".trim($_POST['province']),
           "L" => "".trim($_POST['localityname']),
           "O" => "".trim($_POST['organizationname']),
           "OU" => "".trim($_POST['organizationunit']),
           "CN" => "".trim($_POST['commonname']),
           "emailAddress" => "".trim($_POST['email']));
          $str = ''; 
        	foreach($dn as $key => $val){ 
        	$str .= "/$key=$val"; 
        	} 
        	echo $str;

output is:-`"/C=IN/ST=MAHARASHTRA/L=MUMBAI/O=Couffin Inc/OU=Sales/CN=www.couffin.itpl"`

Now, i want to execute `exec()` command in php and save in to this place

#Generating a cert request

openssl req -new -nodes -out /portal/data/config/certificate/vendor/requests/couffin-req.pem -keyout /portal/data/config/certificate/vendor/requests/couffin-req.key -subj "/C=IN/ST=MAHARASHTRA/L=MUMBAI/O=Couffin Inc/OU=Sales/CN=www.couffin.itpl" -config /portal/data/config/certificate/vendor/openssl.cnf

How can i do this `plz help me`