PHP echo directory contents (as links) not working -


i have php file called download.php link pdf files in directory. allows them appear links open 'save as' instead of trying open in web page. trouble can't following code work. repeats directory items, download.php appended, think php semantics might wrong! got ideas? perhaps not enough info here work out, worth try: code sits on page presenting various pdf files (ordered datelastmodified):

<?php  // *** folder list repeater start  while ($meetingminutes->canrepeat()) {  ?>  <?php echo '<p><a href=\"http://www.duncton.org/download.php?file=login/uploads2/'.$meetingminutes->folderlist('name').'</a></p><br />'; ?>   <?php   $meetingminutes->movenext();  }  $meetingminutes->endrepeater();  // *** folder list repeater end  ?>  

you're not closing anchor tag propertly. you're missing closing quote , closing bracket.

try this

<?php       // *** folder list repeater start       while ($meetingminutes->canrepeat()) {           printf('<p><a href="http://www.duncton.org/download.php?file=login/uploads2/%s">%s</a></p><br />',              $meetingminutes->folderlist('name'), $meetingminutes->folderlist('name'));          $meetingminutes->movenext();       }       $meetingminutes->endrepeater();      // *** folder list repeater end  ?> 

(edited remove escape double quotes)


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -