[eluser]einsteinity[/eluser]
hi, i want to know how to execute command in command prompt with CI..
i have done it in php (not the CI) and here is the code.
Code:
<?
function callAV()
{
exec('C:\"Program Files"\AVG\AVG2012\avgscanx.exe /scan="C: Users\\OWNER\\Documents\\belajar ngetik cepat.docx"', $output);
foreach($output as $line)
{
$mac[] = $line;
}
return $mac;
}
$mac2 = callAV();
?>
<html>
<head><title>Check</title></head>
<body>
<p> Your files : <br />
<?
foreach($mac2 as $coba)
{
echo "$coba <br />";
}
?>
</body>
</html>
the output is the scan result of the file, since this is only experimental code, i join the file path in the code which i want to execute, it means this one..
Code:
exec('C:\"Program Files"\AVG\AVG2012\avgscanx.exe /scan="C:\\Users\\OWNER\\Documents\\belajar ngetik cepat.docx"', $output);
really need some clues here..
PS: i only want to use this on localhost.