![]() |
|
||||||||||
|
|||||
|
Регистрация: Sep 2006
Сообщений: 27
|
есть исходник fla:
on (click) {
xml = new XML();
loginElement = loginXML.createElement("LOGIN");
loginElement.attributes.username = _root.login.text;
loginElement.attributes.password = _root.password.text;
xml.appendChild(loginElement);
loginReplyXML = new XML();
loginReplyXML.onLoad = function() {
var e = this.firstChild;
if (e.nodeName == "LOGINREPLY" && e.attributes.STATUS == "OK") {
trace("ok");
} else {
trace("loginFailed");
}
};
xml.sendAndLoad("http://localhost/login.xml.php", loginReplyXML);
}
Смотрел в POST,GET. HTTP_RAW_POST_DATA тож не хочет. Дык куда? |
|
|||||
|
Et cetera
Регистрация: Sep 2002
Сообщений: 30,787
|
xml.contentType = 'text/xml';
и $GLOBALS['HTTP_RAW_POST_DATA']; В ответ нужно выслать Последний раз редактировалось etc; 12.09.2006 в 14:04. |
|
|||||
|
Регистрация: Sep 2006
Сообщений: 27
|
блин.... не отдает он как XML....
по крайней мере в RAW_POST я так и не получил данные формы... |
|
|||||
|
Регистрация: Sep 2006
Сообщений: 27
|
on (click) {
xml = new XML();
loginElement = loginXML.createElement("LOGIN");
loginElement.attributes.username = _root.login.text;
loginElement.attributes.password = _root.password.text;
xml.appendChild(loginElement);
loginReplyXML = new XML();
loginReplyXML.onLoad = function() {
var e = this.firstChild;
if (e.nodeName == "LOGINREPLY" && e.attributes.STATUS == "OK") {
trace("ok");
} else {
trace("loginFailed");
}
trace(loginReplyXML.toString());
};
xml.contentType = 'text/xml';
xml.sendAndLoad("http://localhost/login.xml.php5", loginReplyXML,"POST");
}
вот код php: а в итоге все одно ... |
|
|||||
|
Et cetera
Регистрация: Sep 2002
Сообщений: 30,787
|
У меня ровным счётом тоже самое работает без проблем. Только в php4.
Не знаю, как там в php5. И ещё, массив RAW POST доступен, только если указан contentType у XML. И вообще, у тебя с XML полный бардак. попробуй. |
|
|||||
|
Регистрация: Sep 2006
Сообщений: 27
|
Я вообще ничего не понял, но как только переписал пример с НУЛЯ, все отлично заработало ....
on (click){
xml = new XML();
LE = xml.createElement("LoginInfo");
LE.attributes.username = _root.login.text;
LE.attributes.password = _root.pwd.text;
xml.appendChild(LE);
xml.contentType = "text/xml";
_root.status.text = "Sending...: "+ xml.toString();
xml1 = new XML();
xml1.onLoad = function(){
_root.status.text = _root.status.text + newline + "Answer..: "+xml1.toString();
var e = this.firstChild;
if (e.nodeName == "LOGINREPLY" && e.attributes.STATUS == "OK") {
_root.status.text = _root.status.text + newline + "Logged in";
} else {
_root.status.text = _root.status.text + newline + "Can`t login";
}
}
xml.sendAndLoad('http://localhost/login.xml.php',xml1);
}
|
![]() |
![]() |
Часовой пояс GMT +4, время: 06:36. |
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | |
| Опции просмотра | |
|
|