ok I've got this simple bit of code that's driving me nutz,
<TABLE width="145" border="1" cellpadding="0" cellspacing="0" bordercolor="#0033FF">
<?php
$dir = "../mydir/";
if ($url = opendir($dir)) {
while (false !== (
$file = readdir($url))) {
$both = $dir.$file;
$link = "<a href=\"$both\">$file</a>";
echo $link,"<br>";
// echo "<a href=\"$href\">$file</a><br>\n";
}
closedir($url);
}
?>
</TD>
</TR>
</TABLE>
it takes the files out of mydir and turns them into links
and on it's own works fine
now I access this peaces of code via htmls include filename, but I've tried opening php and including it
either way I get funny results either nothing is returned ie when I open php or
I get a box with
$file"; echo $link,"
"; // echo "$file
\n"; } closedir($url); } ?>
in it seems halfway through the script php thinks it has to stop,
err
any suggestions would be so appreciated
opps edited it to correct some script errors.. still same problem, it's really driving me batty!!:mad: