Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne]Flash, LoadVars, AS2, odczyt danych z biblioteki na serwerze
laik_PHP
post 7.09.2010, 08:08:35
Post #1





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 28.02.2010

Ostrzeżenie: (0%)
-----


hej, mam metodę w PHP która ma mi zwracać elementy z biblioteki na serwerze ale nie wiem czy poprawnie to robi

kod PHP

  1. $path = "images/";
  2.  
  3. if ($handle = opendir($path)) {
  4. $array = array();
  5. while (false !== ($file = readdir($handle))) {
  6. if($file !== '.' && $file !== '..') {
  7. array_push($array, array($file));
  8. }
  9. }
  10. echo "&arraye=$array";
  11. closedir($handle);
  12. } else {
  13. echo false;
  14. }


Zwraca tablice i chce ją odczytać kodem

Kod
var myVars:LoadVars = new LoadVars();
myVars.onLoad = function(success) {
    if (success) {
        var arraye:Array = myVars.arraye;
        msgbox.text = arraye[0]; // undefined
            // msgbox.text = arraye[0][0]; // undefined
    } else {
        msgbox.text = "load error";
    }
};
myVars.load("file.php", myVars, "POST");



ale wszędzie mam undefined, dlaczego?
pozdrawiam

Ten post edytował laik_PHP 7.09.2010, 08:09:49
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 09:05