Skip to content

Commit

Permalink
php: Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
frednora committed Sep 19, 2024
1 parent 8113bb8 commit 1bd472c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
define('USE_XXX', true);
/*require('./gramado2.php');*/
/*require('./gramado.php');*/
require('./search/search.php');
require ('./search/search.php');
?>
11 changes: 7 additions & 4 deletions search/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,19 @@

<br>
<?php
$files = scandir(getcwd());
foreach ($files as $file)
$cwd = getcwd();
$filename_list = scandir($cwd);
foreach ($filename_list as $filename)
{
if ( is_dir($file) && ctype_alnum($file) )
/* Only directory names with alphanumeric elements */
if ( is_dir($filename) &&
ctype_alnum($filename) )
{
?>

<!-- Button -->
<br/>
<a href="/<?php echo $file; ?>/index.html"><?php echo $file; ?>/</a>
<a href="/<?php echo $filename; ?>/index.html"><?php echo $filename; ?>/</a>

<?php
}
Expand Down

0 comments on commit 1bd472c

Please sign in to comment.