How to get the just the filename of the uploaded file
-
I have a loop of file uploads and I want to get just the filename of file uploaded not the whole url where the filename is uploaded.
For example I uploaded a document file, I want to link to the file and the title of the link is the name of the file.
I have this code.
` <?php
if ( CFS()->get(‘files’) ):echo “<ul class=’small-block-grid-1′>”;
$cfsloop = CFS()->get(‘files’);
foreach ( $cfsloop as $row ) {
echo ‘- <a href=”‘;
echo $row[‘upload’]; // a sub-field named “gallery_title”
echo ‘” class=”button”>’;
echo $row[‘upload’].’
‘;
}echo “”;
endif;
?> - <a href=”‘;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to get the just the filename of the uploaded file’ is closed to new replies.