lāčgrrrriezis Posted July 19, 2008 Report Share Posted July 19, 2008 (edited) man nepieciešams palīgs kurš varētu palīdzēt ieprogrammēt to php lai rāda mapes saturu kā linkus nevis kā parastu tekstu kas parāda mapes saturu pārlūkā. <?php $handle=opendir(".";); while (($file = readdir($handle))!==false) { echo "$file <br>"; } closedir($handle); ?> Edited July 20, 2008 by lāčgrrrriezis Link to comment Share on other sites More sharing options...
andrisp Posted July 19, 2008 Report Share Posted July 19, 2008 Cik maksāsi ? :) Bet vispār: <a> tags. Link to comment Share on other sites More sharing options...
bubu Posted July 19, 2008 Report Share Posted July 19, 2008 html palīgu tev vajag, ne php. Link to comment Share on other sites More sharing options...
Pentiums Posted July 19, 2008 Report Share Posted July 19, 2008 <?php $handle=opendir("."); while (($file = readdir($handle))!==false) { echo "<a href='$file'>$file</a> <br>"; } closedir($handle); ?> Link to comment Share on other sites More sharing options...
lāčgrrrriezis Posted July 20, 2008 Author Report Share Posted July 20, 2008 (edited) Nu a tagad man krāsu nerāda, gribu lai tie linki ir ar tumši pelēko krāsu #66666 a tas nestrādā kautkādā rakā. <?php $handle=opendir("."); while (($file = readdir($handle))!==false) { echo '<b><font size=2 face=Arial color="#66666"><a href="'.$file.'"> '.$file.' </a></font></b></br>'; } closedir($handle);?> Edited July 20, 2008 by lāčgrrrriezis Link to comment Share on other sites More sharing options...
Aikss Posted July 20, 2008 Report Share Posted July 20, 2008 <?php $handle=opendir("."); while (($file = readdir($handle))!==false) { echo <a style="color: #666666; font-weight: bold; font-family: Arial;" href="'.$file.'"> '.$file.' </a></br>'; } closedir($handle);?> Link to comment Share on other sites More sharing options...
bubu Posted July 20, 2008 Report Share Posted July 20, 2008 To vajag CSS'ā darīt, nevis htmlā kautko "iehakot". a { color: #666666; font-weight: bold; font-family: Arial; } Ja negribi to visiem linkiem, tad norādi noteiktu klasi: .linku_klase { ... } Un šo klasi liec visiem a elementiem class atribūtā. Link to comment Share on other sites More sharing options...
lāčgrrrriezis Posted July 20, 2008 Author Report Share Posted July 20, 2008 (edited) <?php $handle=opendir("."); while (($file = readdir($handle))!==false) { echo <a style="color: #666666; font-weight: bold; font-family: Arial;" href="'.$file.'"> '.$file.' </a></br>'; } closedir($handle);?> Ko Tu man te iedevi, tas tak neiet :D:D:D :( Edited July 20, 2008 by lāčgrrrriezis Link to comment Share on other sites More sharing options...
Pentiums Posted July 20, 2008 Report Share Posted July 20, 2008 iemet to garo šmurgu iekš paste.php.lv <?php $handle=opendir("."); while (($file = readdir($handle))!==false) { echo '<a style="color: #666666; font-weight: bold; font-family: Arial;" href="'.$file.'"> '.$file.' </a></br>'; } closedir($handle);?> ^tagad iet^ Link to comment Share on other sites More sharing options...
Aikss Posted July 20, 2008 Report Share Posted July 20, 2008 To vajag CSS'ā darīt, nevis htmlā kautko "iehakot". "iehakot" :)) Uzjautrina, kaut arī pēdiņās. Un vispār jau liktu nevis uzreiz class, bet piekļūtu linkam šādi: #content ul li a (tas ir paraugs un nav uzreiz jādara tā, pietam ar lielu izbrīnu, ka kaut kas neiet) lāčgriezi tu vispār seko līdzi ko tu raksti vai tikai pārkopē visu? Link to comment Share on other sites More sharing options...
lāčgrrrriezis Posted July 21, 2008 Author Report Share Posted July 21, 2008 (edited) logiš ka sekoju, un vispār tas skripts bija šāds nevis kā viens otrs man te murmulēja. <?php $handle=opendir("."); while (($file = readdir($handle))!==false) { echo '<b><font size="2" face="Arial" color="#66666"><a href="'.$file.'" style="color: #666666;"> '.$file.' </a></font></b></br>'; } closedir($handle);?> Edited July 21, 2008 by lāčgrrrriezis Link to comment Share on other sites More sharing options...
andrisp Posted July 21, 2008 Report Share Posted July 21, 2008 Pilnīgi nejēdzīgs HTML. Pentiums vairants labāks. Vēl labāk, protams, būtu to visu likt iekš CSS faila. Link to comment Share on other sites More sharing options...
Recommended Posts