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";


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?


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);




All Articles