its very useful and very simple, iv spent hours on end trying to make the script use the files in the directory it is in, and not the directory it is called from, what i have is a test/index.PHP page that includes the Download lister php script with in it, however when i do this the download script uses the file test/index.php directory insted of looking into its won directory where it is placed. test/dl/download.php
could anyone suggest a soultion or another script that would do the same job,
this script looks for txt fils and the corsponding avi file name and lists it, hence why it makes my life easier
am not very good with php but i do try integrating it, any help would be much appreciated, many thanks
Abs
http://www.3dnuta.com
Code: Select all
<?PHP
$handle=opendir(".");
while (($file = readdir($handle))!==false){
rtrim($file);
if($file=="*.*"){
$file=readdir($handle);
$file=readdir($handle);
}
if($file=="hits.txt"){
$file=readdir($handle);
}
if(eregi("[a-zA-Z0-p_-]*.txt",$file)!==false){
$spliter=explode(".",$file);
$filea="$spliter[0].avi";
$filei="TEXT INFO";
$filez="$spliter[0].avi";
$size=filesize($filez);
$size=($size/1024);
$size=round($size,1);
$info=" Text info files have not yet been created..";
echo "<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0 CLASS=TABLEMAIN><TR>";
echo "<TD CLASS=TDTOP colspan=1><IMG SRC="3dsmax/mov/blank.gif" width=1 height=20></TD>";
echo "<TD CLASS=TDFILESIZE WIDTH=30%></TD></TR>";
echo "<TR><TD CLASS=TDTITLECONTENT>";
echo "<img src="hiddin/box.gif"><IMG SRC="3dsmax/mov/blank.gif" width=5 height=1><A HREF="" onClick="window. open('$filea','cal','width=600,height=400,status=n
o,scrollbars=yes,resizable=yes,toolbar=no,location
=no,directories=no');return false">$spliter[0]</A></B></TD><TD CLASS=TDFILESIZE>Size: $size Kb";
echo "</TD></TR>";
echo "<TR><TD colspan=2 width=100% CLASS=TDCONTENT>";
$filer="$file";
$file=file($filer);
$sline=0;
$count=count($file);
$eline=$count;
$i = $count;
for($j=$sline;$j<$eline;$j++){
echo "$file[$j]";
}
echo "</TD></TR>";
echo "<TR CLASS=TDBOT>";
echo "<TD CLASS=TDBOT>";
echo "<IMG SRC="3dsmax/mov/blank.gif" width=1 height=20>";
echo "<TD CLASS=TDDOWNLOAD><A HREF="" onClick="window. open('$filea','cal','width=600,height=400,status=n
o,scrollbars=yes,resizable=yes,toolbar=no,location
=no,directories=no');return false">[] PLAY</A></TD>";
echo "</TD></TR></TABLE>";
} else {
}
}
?>
-->http://63.247.87.234/~kingabz/3dnut...o/3dsmaxmov.php
and here is the same page but using the readfile method,
http://63.247.87.234/~kingabz/3dnut...3dsmaxmovrd.php
Am so crap at this.....
__________________
Abs
http://www.3dnuta.com
__________________
Abs