Hi All,
I am writing one find statement which gives me all the files related with the specific user name the user entered.
my code looks like
<?php
$title = "Grading Form";
if(isset($_POST['fname'])) { $f1 = $_POST['fname']; }
if(isset($_POST['lname'])) { $l1 = $_POST['lname']; }
if(isset($_POST['add'])) { $a1 = $_POST['add']; }
if(isset($_POST['date'])) { $d1 = $_POST['date']; }
$fullname = $l1.","." ".$f1;
$dirname = "/home/gr/ereports/O1" ;
$handle = opendir($dirname) or die('cant open');
$ans = shell_exec("find /home/gr/ereports/O1/$d1* -name \"*.ps\" -exec grep -i -e $fullname {} \\; -print0 ");
echo $ans;
?>
here I am getting all the files with the username as a string..If there are 4 files, I got all file's path as a single string.
I want to make them seperate..May be an array or newline or something..And not as a whole string..
What can be done