simplify glob loop and add htmlspecialchars()
This commit is contained in:
parent
36ddf8b7a6
commit
cf04720d67
|
@ -14,13 +14,11 @@
|
|||
<h1>taglines</h1>
|
||||
<p>create a oneline ~/public_html/tagline.txt to appear here</p>
|
||||
<hr>
|
||||
<?php foreach (glob("/home/*") as $user) {
|
||||
$user = basename($user);
|
||||
$tagline = "/home/$user/public_html/tagline.txt";
|
||||
if (!is_file($tagline)) continue;
|
||||
$tag = strip_tags(file_get_contents($tagline));
|
||||
<?php foreach (glob("/home/*/public_html/tagline.txt") as $tagline) {
|
||||
$user = basename(dirname(dirname($tagline)));
|
||||
$tag = file_get_contents($tagline);
|
||||
?>
|
||||
<p><a href="/~<?=$user?>/"><strong>~<?=$user?></strong></a> - <?=$tag?></p>
|
||||
<p><a href="/~<?=$user?>/"><strong>~<?=$user?></strong></a> - <?=htmlspecialchars($tag)?></p>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue