neo_philiac
09-25-2008, 05:36 PM
Here is what I am doing
<?php
$count = 0;
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {$count++;
print("<a href=\"".$file."\">".$file."</a><br />\n");
}
}
echo '<br /><br /><a href="..">Return</a>';
closedir($handle);
}
?>
I am listing all the files in a directory. For example: test.txt. What I want to accomplish is that whenever I click on the filename, I want to call a php script (or maybe in the same script) to perform some operation on the content of the test.txt file and give me the output for test.txt
How can I do it?
Please help!
<?php
$count = 0;
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {$count++;
print("<a href=\"".$file."\">".$file."</a><br />\n");
}
}
echo '<br /><br /><a href="..">Return</a>';
closedir($handle);
}
?>
I am listing all the files in a directory. For example: test.txt. What I want to accomplish is that whenever I click on the filename, I want to call a php script (or maybe in the same script) to perform some operation on the content of the test.txt file and give me the output for test.txt
How can I do it?
Please help!