Answer the question
In order to leave comments, you need to log in
When sending data in Cyrillic from flash to php5, php deletes everything that should have been saved in xml. Why?
When sending data in Cyrillic from flash to php5, php deletes everything that should have been saved in xml. And when repeating the entire operation only on the English layout, everything works. I took this into account:
$a = new DOMDocument('1.0','cp1251');
here is the php code:
<?php
$file = 'reg.xml';
$a = new DOMDocument('1.0','cp1251');
$name = @$_POST['amp;name'] or $name = '';
$fam = @$_POST['amp;fam'] or $fam = '';
$login = @$_POST['amp;login'] or $login = '';
$mail = @$_POST['amp;mail'] or $mail = '';
$yea = @$_POST['amp;yea'] or $yea = '';
$day = @$_POST['amp;day'] or $day = '';
$mon = @$_POST['amp;mon'] or $mon = '';
$pass = @$_POST['amp;pass'] or $pass = '';
$sex = @$_POST['amp;sex'] or $sex = '';
$photo = @$_POST['amp;photo'] or $photo = '';
if([email protected]$a->load($file))
{
$adata = $a->appendChild($a->createElement('data'));
}
else
{
$adata=$a->firstChild;
}
$aitem = $adata->appendChild($a->createElement('item'));
$aitem->setAttribute('login',$login);
$aitem->setAttribute('name',$name);
$aitem->setAttribute('fam',$fam);
$aitem->setAttribute('mail',$mail);
$aitem->setAttribute('yea',$yea);
$aitem->setAttribute('day',$day);
$aitem->setAttribute('mon',$mon);
$aitem->setAttribute('pass',$pass);
$aitem->setAttribute('sex',$sex);
$aitem->setAttribute('photo',$photo);
$a->save($file);
?>
<?xml version="1.0" encoding="cp1251"?>
<data>
<data>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question