|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73417 Missing "t"s at the end of data compiled
Submitted: 2016-10-30 02:57 UTC Modified: 2016-10-30 06:55 UTC
From: ficareli at terra dot com dot br Assigned:
Status: Not a bug Package: Strings related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ficareli at terra dot com dot br
New email:
PHP Version: OS:


 [2016-10-30 02:57 UTC] ficareli at terra dot com dot br
Bug: When you run the website, some "t"s or "x" are absent (or every) at the end of the song titles. Example: "Aretha Franklin - Respec", even if the song title and filename are perfect.

I have a band ( and we have a website to document the songs to play, with lyrics. Offline we also use multimedia.

The main page has a frameset of two windows as below

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<link rel="icon" href="../WebSite/Favico.png" type="image/png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="KeyWords" content="Loupha, rock, musica, pop, banda, Vermelho">
<meta name="DESCRIPTION" content="Loupha Rock Band Official Site">
<meta name="copyright" content="Esedra Brasil">
<meta name="robot" content="index">
<meta name="Index" content="index,follow">
<meta name="date" content="2002-03-15">
<title>LOUPHA - a Rock Legend</title>
<frameset cols="300,*" frameborder="no" border="0">
	<frame name="indice_2" src="indiceLyrics.php?pasta='../LRC/'" marginheight="0" marginwidth="0" noresize>
	<frame name="master" src="Legend.htm" marginheight="0" marginwidth="8" noresize>

Por favor, troque o seu Browser por um mais novo.<br>
Consulte seu provedor.
Este Site usa Frames.

Ficarelli - Multimedia Designer


The PHP page at left (that causes the bug) is below. I tried every type of string function to relieve the problem, but none.
This bug always happened offline and online

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>LOUPHA INDICE</title>
  <link rev="made" href="">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="generator" content="NoteTab Pro 4.95">
  <meta name="author" content="Marcos Ficarelli">
  <meta name="description" content="automação de letras musicais">
  <meta name="keywords" content="musica, letra, lyrics">
<link rel="stylesheet" type="text/css" href="CSSJS/IndiceLyrics.css">
<h4>Letras de Música MAIN</h4>
<p><a href="indiceLyrics.php">Main</a>, 
<a href="indiceLyricsBrasil.php">Brasil</a>, 
<a href="indiceLyricsEuropeo.php">Europeo</a>, 
<a href="indiceLyricsItalia.php">Italia</a>, 
<a href="indiceLyricsOther.php">Other</a>, 
<a href="indiceLyricsPlay.php">Play</a>, 


## TENTAR USAR SCANDIR(directory) - retorno total

# usando opendir
$dir = "../LRC/";
$ext = ".txt";
$dh  = opendir($dir);

$i = 0;
while (false !== ($filename = readdir($dh))) {
$pos = stripos($filename,$ext);
if ($pos !== false){
	$files[] = $filename;

$r = 0;
do {
echo "<a href='Lyrics.php?letra=".htmlspecialchars($files[$r],ENT_QUOTES)."' target='master'>".trim($files[$r],$ext)."</a><br>\r\n";
	} while ($r <= $i);



Test script:
BB King - How Blue Can You Ge


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-30 06:55 UTC]
-Status: Open +Status: Not a bug
 [2016-10-30 06:55 UTC]
You are using trim() incorrectly. The 2nd parameter is a list of all characters to be trimmed from the end, and you have set it to ".txt" so trailing t's will be stripped. Refer to the documenation at
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 19:01:28 2024 UTC