clustalw2 -INFILE=seq.txt -TYPE=Protein -OUTFILE=...">

Pass cmd commands via PHP script

Here is my php code

$command = "C:\Program Files\ClustalW2>clustalw2 -INFILE=seq.txt -TYPE=Protein -OUTFILE=res.aln";
exec($command);

      

When I run the command using cmd, it generates the file I want. However, when I try to pass the same command through my php code, it doesn't generate any result. How do I fix this problem?

+3


source to share


1 answer


Could it be because of the character >

in front of the executable name? Alternatively, try single quotes:



$command = 'C:\Program Files\ClustalW2\clustalw2 -INFILE=seq.txt -TYPE=Protein -OUTFILE=res.aln';
exec($command, $output, $retval);
var_dump($output);
var_dump($retval);

      

+2


source







All Articles