hello,
You guys did such a great job getting me to run thru what must've happened last time, I thought I'd do it again 8 )__.
I'm using PHP in Included file to run thru the file system and print the .txt files, therein, to screen and I am baffled. It seems to want to print every file & below 100 words ( a no-no). Below is the script (variables made clearer). I just thought to use $wCount (doesn't work either) in Switch but I'd still like to know why this won't work {8 ]__. thank you for your input
[this is funny :
i put echo "hello > 100 !"; in the case true, and, it only printed it in those greater than 100 ; >]
phfff ! I had some html tags in one of the .txt files (removed tags and fixed the problem)!! I thought i'd leave this up a few days to let others know what could happen (so, simple)
You guys did such a great job getting me to run thru what must've happened last time, I thought I'd do it again 8 )__.
I'm using PHP in Included file to run thru the file system and print the .txt files, therein, to screen and I am baffled. It seems to want to print every file & below 100 words ( a no-no). Below is the script (variables made clearer). I just thought to use $wCount (doesn't work either) in Switch but I'd still like to know why this won't work {8 ]__. thank you for your input
[this is funny :
i put echo "hello > 100 !"; in the case true, and, it only printed it in those greater than 100 ; >]
phfff ! I had some html tags in one of the .txt files (removed tags and fixed the problem)!! I thought i'd leave this up a few days to let others know what could happen (so, simple)
<?php echo mains();
function mains(){
global $scan=(the scanned folder/for text files);
global $br="<br/>";
global $hr="<hr size='10'>";
foreach($scan as $a){
$reading=fread(fopen("$a","r"),filesize("$a"));
$wCount=str_word_count($reading);
if(is_file($a)){
switch(str_word_count($reading)>100){
case true:
echo $wCount.$br;
echo $reading.$br.$hr;break;}}}} ?>
Last edited: