I am trying to get one of the program execution functions ( exec(), system(), passthru() ) to work on a page for me, but whenever I include them in my code the page simply doesnt load. I have checked with my server and had safe_mode turned off. Here is the code if it would help. Thanks.
<?php
//ini_set("allow_url_fopen", 1);
echo ("<br><br><br>");
echo ("UNIX time= ".time());
echo ('<H1>List of links</H1>');
//$command = "\cmd.exe";
system('c:\\WINNT\\system32\\cmd.exe ');
system('file:///C:/jlt.txt');
//echo($outstring);
echo("changes made* <br>");
// Copy file data into a string
$filestring=file_get_contents("jlt.txt");
//$teststring=file_get_contents("jlt.txt");
//$pagehand=fopen("page.txt", "w");
//fwrite($pagehand, $outstring);
//fclose($pagehand);
$pos1=strpos($filestring, 'label type "');
if($pos1===FALSE){ echo ("Error in reading folder");}
while($pos1!==FALSE)
{
$pos1=$pos1+12;
$pos2=strpos($filestring, '"', $pos1);
//echo ("position1 is".$pos1);
//echo (" position2 is".$pos2);
//echo (" position3 is".$pos3);
$len1=$pos2-$pos1;
//echo (" lenght of URL is ".$len1);
$lbltype=substr($filestring, $pos1, $len1);
echo($lbltype);
echo("<br>");
$pos1=strpos($filestring, 'label type "', $pos2);
}
?>