A voir également:
- Mysql flex
- Chrome os flex - Guide
- Mysql community server - Télécharger - Bases de données
- Mysql a répondu : documentation connexion impossible : paramètres incorrects. - Forum Bases de données
- Free flex refusé - Forum Ordinateurs
- Free flex avis - Forum Mobile
2 réponses
koforever
Messages postés
10
Date d'inscription
mercredi 17 décembre 2008
Statut
Membre
Dernière intervention
18 juin 2011
2
11 août 2010 à 18:06
11 août 2010 à 18:06
salut ,
ta reponse est ici : http://social.hecube.net/blog/2009/05/05/flex-amfphp-connecter-un-service-amfphp-a-une-application-flex/
ta reponse est ici : http://social.hecube.net/blog/2009/05/05/flex-amfphp-connecter-un-service-amfphp-a-une-application-flex/
Salut,
j'ai le même problème que toi, as tu trouvé la solution ?
Merci
j'ai le même problème que toi, as tu trouvé la solution ?
Merci
<?PHP
ini_set('display_errors', "1");
ini_set('error_reporting', E_ALL ^ E_NOTICE);
header("Content-type: text/xml");
//Connect to Database
include 'dbconnect.php';
$linkID = mysql_connect($db_host, $db_user, $db_pwd) or die("Impossible de se connecter a la base de donnees");
mysql_select_db($db_name, $linkID) or die("Base de donnees inexistante");
$query = "SELECT * FROM fabricant ORDER BY fabricant_id DESC";
$resultID = mysql_query($query, $linkID) or die("Donnees pas trouves");
$xml_output = "<?xml version='1.0' encoding='utf-8'?>\n";
$xml_output .= "<fabricants>\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t<fabricant>\n";
// Escaping illegal characters
$row['text'] = str_replace("&", "&", $row['text']);
$row['text'] = str_replace("<", "<", $row['text']);
$row['text'] = str_replace(">", ">", $row['text']);
$row['text'] = str_replace("\"", """, $row['text']);
$xml_output .= "\t\t<fabricant_id>" . $row['fabricant_id'] . "</fabricant_id>\n";
$xml_output .= "\t\t<fabricant_nom>" . $row['fabricant_nom'] . "</fabricant_nom>\n";
$xml_output .= "\t\t<fabricant_image>" . $row['fabricant_image'] . "</fabricant_image>\n";
$xml_output .= "\t\t<fabricant_web>" . $row['fabricant_web'] . "</fabricant_web>\n";
$xml_output .= "\t\t<fabricant_email>" . $row['fabricant_email'] . "</fabricant_email>\n";
$xml_output .= "\t</fabricant>\n";
}
$xml_output .= "</fabricants>";
echo $xml_output;
?>
ini_set('display_errors', "1");
ini_set('error_reporting', E_ALL ^ E_NOTICE);
header("Content-type: text/xml");
//Connect to Database
include 'dbconnect.php';
$linkID = mysql_connect($db_host, $db_user, $db_pwd) or die("Impossible de se connecter a la base de donnees");
mysql_select_db($db_name, $linkID) or die("Base de donnees inexistante");
$query = "SELECT * FROM fabricant ORDER BY fabricant_id DESC";
$resultID = mysql_query($query, $linkID) or die("Donnees pas trouves");
$xml_output = "<?xml version='1.0' encoding='utf-8'?>\n";
$xml_output .= "<fabricants>\n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t<fabricant>\n";
// Escaping illegal characters
$row['text'] = str_replace("&", "&", $row['text']);
$row['text'] = str_replace("<", "<", $row['text']);
$row['text'] = str_replace(">", ">", $row['text']);
$row['text'] = str_replace("\"", """, $row['text']);
$xml_output .= "\t\t<fabricant_id>" . $row['fabricant_id'] . "</fabricant_id>\n";
$xml_output .= "\t\t<fabricant_nom>" . $row['fabricant_nom'] . "</fabricant_nom>\n";
$xml_output .= "\t\t<fabricant_image>" . $row['fabricant_image'] . "</fabricant_image>\n";
$xml_output .= "\t\t<fabricant_web>" . $row['fabricant_web'] . "</fabricant_web>\n";
$xml_output .= "\t\t<fabricant_email>" . $row['fabricant_email'] . "</fabricant_email>\n";
$xml_output .= "\t</fabricant>\n";
}
$xml_output .= "</fabricants>";
echo $xml_output;
?>
coté flex :
<s:HTTPService id="fabricant_select" url="http://localhost:8888/tondossier/bin-debug/fabricant_select.php" useProxy="false" />
<s:HTTPService id="serv" url="http://localhost:8888/tondossier/bin-debug/fabricant_select.php" fault="serv_faultHandler(event)" result="serv_resultHandler(event)"/>
<s:HTTPService id="fabricant_select" url="http://localhost:8888/tondossier/bin-debug/fabricant_select.php" useProxy="false" />
<s:HTTPService id="serv" url="http://localhost:8888/tondossier/bin-debug/fabricant_select.php" fault="serv_faultHandler(event)" result="serv_resultHandler(event)"/>