Ékezet PHP-ben
Sziasztok!
Az alábbi oldalról töltöttem le shoutbox kódot: http://sandbox.palmnet.me.uk/shoutbox
Az ékezetet nem engedi, és nem tudok rájönni mi lehet a gond.
Az index.php fájl:A post.php pedig:Valaki tudna nekem segíteni?
Köszönettel: Tibor
■ Az alábbi oldalról töltöttem le shoutbox kódot: http://sandbox.palmnet.me.uk/shoutbox
Az ékezetet nem engedi, és nem tudok rájönni mi lehet a gond.
Az index.php fájl:
- <table>
- <?php
- include "config.php";
- include "functions.php";
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
- <meta name="robots" content="all"/>
- <link href="design/style.css" rel="stylesheet" type="text/css" />
- <link href="<?php echo geturldir(); ?>rss.php" rel="alternate" type="application/rss+xml" title="<?php echo $adminname; ?>'s shoutbox RSS feed" />
- <link href="design/favicon.ico" rel="shortcut icon" />
- <script language="javascript" type="text/javascript">
- if(top!=self)
- {
- top.location.href=self.location.href;
- }
- </script>
- <!-- Original design by PWnet | www.pwnet.org.uk | October 2006 -->
- <!-- Shoutbox by Palmnet | www.palmnet.me.uk | October 2006 -->
- <!-- Shoutbox version 1.0RC5 -->
- </head>
- <body>
- <div id="page">
- <div id="header">
- <div id="menu">
- <a href="index.php<?php if($_SERVER['QUERY_STRING'] != ""){ echo "?" . $_SERVER['QUERY_STRING']; }?>"><font color=white>Frissités</font></a>
- </div>
- <div id="content">
- <?php include"post.php"; ?>
- </div>
- </div>
- </div>
- </body>
- </html>
- </table>
- <table>
- <?php
- //This is the main code really. It's what gets the input and lets the output be shown.
- // Though it's only ever used once, on the index.php
- //
- //If they have submitted data from the main form
- if (isset($_POST['submit']))
- {
- //Get the values form the input boxes and sanitise them
- $username = msgfilter($_POST['name']);
- $message = msgfilter($_POST['content']);
- //Validate the things they put in there
- $errorcode = validpost($username,$message);
- //This is one big mother of an if. It decides what you wanted and if you can have it, basically.
- if(isadmin($username) && strtolower($message) == "+edit"){ //If and admin and they want to edit...
- echo editform(); //Give them the edit form
- }elseif(!isadmin($username) && strtolower($message) == "+edit"){//If not an admin and want to edit...
- if($errorcode != ""){//If they already have errors, like attempting to be the admin
- $errorcode .= "<br />And don't try to edit other peoples posts either!"; //Tell them off
- }else{ //Else
- $errorcode = "You must be the admin to edit other peoples posts."; //Just slap the wrist
- }
- echo postform($errorcode); //And echo the normal post form, with the error code
- }elseif(strtolower($message) == "+credits"){ //If they request credits
- echo credits($username); //Give them the credits
- }elseif(isadmin($username)){ //If they are the admin
- $username = strtoupper($adminname{0}) . substr($adminname, 1); //Give them a nice capitalised name
- if($errorcode == ""){ // If no errors..
- postmsg($username,$message); //Post the message
- }
- echo postform($errorcode); //And display the post form
- }else{ //Otherwise
- if($errorcode == ""){ //If no errors
- postmsg($username,$message); //Post the message
- }
- echo postform($errorcode); //and give them the output as normal
- }
- }elseif($HTTP_GET_VARS['item'] >= 0 && is_numeric($HTTP_GET_VARS['item'])){ //If they want to see an item
- echo displayhistory($HTTP_GET_VARS['item']); //Show them the specified item
- }elseif($HTTP_GET_VARS['guid'] >= 0 && is_numeric($HTTP_GET_VARS['guid'])){ //If they get here from the guid tag
- echo displayhistory(($HTTP_GET_VARS['count'])-($HTTP_GET_VARS['guid'])); //Show them the specified item
- }else{
- //If nothing has happened yet just show the post form.
- // However, if you just goto post.php it will be blank unless it's part of index.php
- echo @postform($errorcode);
- }
- ?>
- </table>
Köszönettel: Tibor
Link, probléma?
Miért van egy
<table>
elem aDOCTYPE
deklaráció előtt?Jó lenne látni az oldalt, mert így nem derül ki mi is a problémád és hol.
Helló
itt van a shoutbox demója, az ékezetes betűket nem jeleníti meg.
A saját oldalam nem akarom mutatni, mert kinevetnétek.
Annyiban alakítottam át a kódot, hogy az index.php fejlécébe beleraktam
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> meta tagot, illetve külalakban.
"A saját oldalam nem akarom mutatni, mert kinevetnétek."
Font / szöveg kezelés
Szia
Még egyszer köszi a tippet Poetro.
hello
proba
itt:
content.txt
str_replace
Találtam ezt a linket
illetve keresgéltem arra, hogy "str_replace accent", de nem tudom hogyan hasznosítsam ebben a shoutboxban.
Sziasztok
Megoldottam
Üdv