|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-01 15:27 UTC] jim at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jun 30 09:00:02 2026 UTC |
The following script <?php $fileno = $column = 0; $TDopen = array ( 0 => "\n<TR><TD>\n", 1 => "\n</TD><TD>\n", 2 => "\n</TD><TD>\n "); $Book_Of_Spells = "/usr/localhost/apache/share/htdocs/admin/pages/book_of_spells "; $B_O_S = dir ( "$Book_Of_Spells/RCS" ); echo "Handle: ".$B_O_S->handle."<br>\n"; echo "Path: ".$B_O_S->path."<br>\n"; while ($filesname = $B_O_S->read()) { if (ereg ( "html", $filename )) { $name = split (",", $filename); $title = passthru (`rlog -t $Book_Of_Spells/$name[0] | grep -v \":\" | gre p -v \"^=====\" | grep -v \"^\$\"`); print $TDopen[$column++]; print "<FONT SIZE=-2><A HREF=\"$Book_Of_Spells/$name[0]\">$title</A></FONT >"; } else { print $TDopen[$column++]; print "File No. ".++$fileno.":".$filename; } if ($column == 3) { $column = 0; print "\n</TD></TR>"; } } if ($column != 0) { for ($i=$column; $i<3; $i++) { print "$TDopen[$i]"; print " "; } print "\n</TD></TR>"; } $B_O_S->close(); ?> spits out the correct pathname and the correct _number_ of filenames, but they are all blank. I have no doubt that I am doing something wrong, but I can't find it. I followed the opendir/rewinddir/readdir examples first but couldn't tell what was really going on. When I switched over to the class examples I finally got the pathname and found that it was correct. This was a perl script and I'm trying to convert it over to php3. Haven't even gotten to debugging the passthru. One thing at a time. I neither compiled nor installed php3, but, if you could tell me what you need, I'll be glad to provide it (the httpd.conf and php3.ini files are a bit big for attaching if you don't need the whole thing).