1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Connexion AS400</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?PHP
$dsn = "AS400CHHF"; /* Nom du lien ODBC mis dans le fichier de configuration odbc.ini */
$user = "USER"; /* Votre nom dutilisateur AS400 */
$passwd = "MDP"; /* Mot de passé AS400 */
$conn = odbc_connect($dsn,$user,$passwd );
echo "Id de connexion: $conn";
if ($conn <= 0) {
echo "Error in connection<BR>";
exit;
}
else {
echo "ok";
$query = "SELECT * FROM SBCPT/CLISIG";} /* Lecture dune table de lAS400 */
$result = odbc_Exec($conn, $query);
odbc_result_all($result);
odbc_close($conn);
?>
</body>
</html> |
Partager