PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
weird symbols all over the page Posted by lih0nman on 31 Aug 2006 at 7:24 AM
hi.

i have a problem with weird symbols appearing on my page that look that this: ?

they are appearing in most of my *.php files.

(if it cannot be displayed in this post, view here: http://www.chezjeff.net/file_archive/weirdsymbol.bmp)

i checked the source of the rendered page in the browser. they aren't in the source code, but they are appearing in the *.php pages.

how can i get rid of them? thanks.
Report
Re: weird symbols all over the page Posted by IDK on 31 Aug 2006 at 8:39 AM
: hi.
:
: i have a problem with weird symbols appearing on my page that look that this: ?
:
: they are appearing in most of my *.php files.
:
: (if it cannot be displayed in this post, view here: http://www.chezjeff.net/file_archive/weirdsymbol.bmp)
:
: i checked the source of the rendered page in the browser. they aren't in the source code, but they are appearing in the *.php pages.
:
: how can i get rid of them? thanks.
:

It could be other characters like newline or some foreign letters that the font or program didn't support.
Report
Re: weird symbols all over the page Posted by lih0nman on 31 Aug 2006 at 9:11 AM
: It could be other characters like newline or some foreign letters that the font or program didn't support.
:


you mean, like a <br /> line-break tag or a &nbsp; placeholder?
Report
Re: weird symbols all over the page Posted by IDK on 31 Aug 2006 at 9:26 AM
: : It could be other characters like newline or some foreign letters that the font or program didn't support.
: :
:
:
: you mean, like a <br /> line-break tag or a &nbsp; placeholder?
:
No, like on programs that doesn't support them
Report
Re: weird symbols all over the page Posted by lih0nman on 31 Aug 2006 at 4:00 PM
: : : It could be other characters like newline or some foreign letters that the font or program didn't support.
: : :
: :
: :
: : you mean, like a <br /> line-break tag or a &nbsp; placeholder?
: :
: No, like on programs that doesn't support them
:

there aren't any characters like that.
my site is in English so it doesn't contain any accented characters.
anything else that could go wrong?
Report
Re: weird symbols all over the page Posted by IDK on 1 Sept 2006 at 8:10 AM
: : : : It could be other characters like newline or some foreign letters that the font or program didn't support.
: : : :
: : :
: : :
: : : you mean, like a <br /> line-break tag or a &nbsp; placeholder?
: : :
: : No, like on programs that doesn't support them
: :
:
: there aren't any characters like that.
: my site is in English so it doesn't contain any accented characters.
: anything else that could go wrong?
:

Post your code at the place it uccurs
Report
Re: weird symbols all over the page Posted by lih0nman on 1 Sept 2006 at 6:37 PM
ok
please have a look at this ...

http://www.chezjeff.net/file_archive/weirdsymbol2.bmp

the symbol is right above 'Entries under the category ...'.
this is part of dispcategory.php?cat=15

******************BEGIN********************

<tr><td valign="top" align="left">
<p class="title">Blog<br />&nbsp;</p></td></tr>
<tr><td align="left" valign="top">

<?php

/* copy the query string */
$catnum = $_GET["cat"];

if ($catnum == "whatis")
include('whatis.htm');
else {
if ((is_finite($catnum) == 1 ) && ($catnum >= 0)) {
/* check if the query string is valid (numeric and positive) */
$file = fopen($catnum.".txt", "r");
/* opens the file corresponding to $catnum
$nEntry = fgets($file);
if ($nEntry != 0) { /* check if the category has entry(ies) under it */
$n = 0;
while ($n != $nEntry) {
/* read all the contents in the file */
$entrytitle[$n] = fgets($file);
$entryurl[$n] = fgets($file);
$n += 1;
}
fclose($file);
$catn = $catnum;
include('catindex.php');
/* write the content using HTML formatting */
echo "<p align=left class=subj>Entries under the category ".$catname."</p>";
echo "<p align=left>";
$n = 0;
while ($n != $nEntry) {
echo '<a target=_top href='.$entryurl[$n].'>'.$entrytitle[$n].'</a><br />';
$n += 1;
}
} else {
echo '<p>&nbsp;</p><p align=left>No entries are under this category.</p>';
}

} else {
/* this 'else' corresponds to 'if ($catnum == "whatis") ' */
echo '<p>&nbsp;</p><p align=left>Invalid query string. Please verify.</p>';
}
}
?>
</td>

*******************END*************************

and this is the content of 15.txt

*******************BEGIN***********************

1
September 1, 2006 - Official Launch
http://www.chezjeff.net/blog/admin/entry.php?id=6

********************END************************

Report
Re: weird symbols all over the page Posted by IDK on 2 Sept 2006 at 1:03 AM
: ok
: please have a look at this ...
:
: http://www.chezjeff.net/file_archive/weirdsymbol2.bmp
:
: the symbol is right above 'Entries under the category ...'.
: this is part of dispcategory.php?cat=15
:
: ******************BEGIN********************
:
: <tr><td valign="top" align="left">
: <p class="title">Blog<br />&nbsp;</p></td></tr>
: <tr><td align="left" valign="top">
:
: <?php
:
: /* copy the query string */
: $catnum = $_GET["cat"];
:
: if ($catnum == "whatis")
: include('whatis.htm');
: else {
: if ((is_finite($catnum) == 1 ) && ($catnum >= 0)) {
: /* check if the query string is valid (numeric and positive) */
: $file = fopen($catnum.".txt", "r");
: /* opens the file corresponding to $catnum
: $nEntry = fgets($file);
: if ($nEntry != 0) { /* check if the category has entry(ies) under it */
: $n = 0;
: while ($n != $nEntry) {
: /* read all the contents in the file */
: $entrytitle[$n] = fgets($file);
: $entryurl[$n] = fgets($file);
: $n += 1;
: }
: fclose($file);
: $catn = $catnum;
: include('catindex.php');
: /* write the content using HTML formatting */
: echo "<p align=left class=subj>Entries under the category ".$catname."</p>";
: echo "<p align=left>";
: $n = 0;
: while ($n != $nEntry) {
: echo '<a target=_top href='.$entryurl[$n].'>'.$entrytitle[$n].'</a><br />';
: $n += 1;
: }
: } else {
: echo '<p>&nbsp;</p><p align=left>No entries are under this category.</p>';
: }
:
: } else {
: /* this 'else' corresponds to 'if ($catnum == "whatis") ' */
: echo '<p>&nbsp;</p><p align=left>Invalid query string. Please verify.</p>';
: }
: }
: ?>
: </td>
:
: *******************END*************************
:
: and this is the content of 15.txt
:
: *******************BEGIN***********************
:
: 1
: September 1, 2006 - Official Launch
: http://www.chezjeff.net/blog/admin/entry.php?id=6
:
: ********************END************************
:
:
OK, this is what I would recomend...

DEBUG...

Insert a echo "<!-- -->"
Before and after the wierd chars.

Try to isolate where it comes from.


This is what I could find in the output, it doesn't corespond to your code but it's close...
<p class="title">Blog</p></td></tr>
<tr><td align="left" valign="top">
<span id="e7"></span>?
<p class="subj">First of September</p>


If you manage to isolate it, like this
<p class="title">Blog</p></td></tr>
<tr><td align="left" valign="top">
<span id="e7"></span>
<!--  -->
?
<!--  -->
<p class="subj">First of September</p>


You could as a last resort do like this:

<p class="title">Blog</p></td></tr>
<tr><td align="left" valign="top">
<span id="e7"></span>
<!--
?
-->
<p class="subj">First of September</p>


But I think you will find out where the problem lies before that is necesary.
Report
Re: weird symbols all over the page Posted by lih0nman on 2 Sept 2006 at 8:28 AM
i'll have a try.
thanks very much



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.