Geçersiz karakter metin içeriğinde bulundu.

0 Cevap php

Ben şu hata var,

Geçersiz karakter metin içeriğinde bulundu. Hata işleme kaynak

Ben dinamik utf-8.I sorunu resolved.But ISO-8859-1.The hatası bunu değiştirdi Ben kullanılan php.The kodlamayı kullanarak xml dosyasını oluşturduğunuz zaman olarak görüntülenir Yani Tamil, Hintçe içeriği yaşıyorum edilir

à ® à ® à ¯ à ® ° à ¾ ®-à ® à ¯ à ® à ¯ à ® à ¯ -

header('Content-Type: application/xml'); echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; ?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> <?php $sql = "SELECT * FROM table "; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { ?>  <url>  <loc>http://example.com/<?php echo $row[2]; ?></loc>  <lastmod><?php echo str_replace(' ', 'T', $row['dat']).substr(date("O"), 0, -2).':00'; ?></lastmod>  </url> <?php } ?></urlset>

Bunu çözmek için?

Regards Rekha http://hiox.org


Aşağıdaki yorumun kodu ekleyerek:

<?
    header('Content-Type: application/xml');
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<?php
     $sql = "SELECT * FROM table ";
     $result = mysql_query($sql) or die(mysql_error());
     while($row = mysql_fetch_assoc($result)) {
?>
    <url>
        <loc>http://example.com/<?php echo $row[2]; ?></loc>
        <lastmod><?php echo str_replace(' ', 'T', $row['dat']).substr(date("O"), 0, -2).':00'; ?></lastmod>
    </url>
<?php } ?>
</urlset>

0 Cevap