トップ
新規
一覧
単語検索
最終更新
ヘルプ
ログイン
アールメカブ
PHP_XML
をテンプレートにして作成
開始行:
sudo pear install XML_Query2XML ## --alldeps を忘れた
[sudo] password for ishida:
Did not download optional dependencies: pear/Net_LDAP2,
pear/MDB2, pear/I18N_UnicodeString, use --alldeps to d...
automatically
pear/XML_Query2XML can optionally use package "pear/Net_...
pear/XML_Query2XML can optionally use package "pear/MDB2"
pear/XML_Query2XML can optionally use package
"pear/I18N_UnicodeString"
downloading XML_Query2XML-1.7.1.tgz ...
Starting to download XML_Query2XML-1.7.1.tgz (169,218 by...
.....................................done: 169,218 bytes
install ok: channel://pear.php.net/XML_Query2XML-1.7.1
ishida@app:~/public_html$ sudo pear install --alldeps MDB2
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
..........................done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL dr...
MDB2: Optional feature ibase available (Interbase/Firebi...
MDB2: Optional feature mysql available (MySQL driver for...
MDB2: Optional feature mysqli available (MySQLi driver f...
MDB2: Optional feature mssql available (MS SQL Server dr...
MDB2: Optional feature oci8 available (Oracle driver for...
MDB2: Optional feature pgsql available (PostgreSQL drive...
MDB2: Optional feature querysim available (Querysim driv...
MDB2: Optional feature sqlite available (SQLite2 driver ...
MDB2: To install optional features use "pear install
pear/MDB2#featurename"
ishida@app:~/public_html$ sudo pear install --alldeps MD...
Skipping package "pear/MDB2", already installed as versi...
downloading MDB2_Driver_mysql-1.4.1.tgz ...
Starting to download MDB2_Driver_mysql-1.4.1.tgz (36,481...
..........done: 36,481 bytes
install ok: channel://pear.php.net/MDB2_Driver_mysql-1.4.1
ishida@app:~/public_html$ sudo pear install --alldeps MD...
Skipping package "pear/MDB2", already installed as versi...
downloading MDB2_Driver_mysqli-1.4.1.tgz ...
Starting to download MDB2_Driver_mysqli-1.4.1.tgz (38,06...
..........done: 38,064 bytes
install ok: channel://pear.php.net/MDB2_Driver_mysqli-1....
<?php
// include required files
include 'XML/Query2XML.php';
include 'MDB2.php';
try {
// initialize Query2XML object
$q2x =
XML_Query2XML::factory(MDB2::factory(
'mysql://USER_NAME:PASSWORD@localhost/DB_NAM...
// generate SQL query
// get results as XML
$sql = "SELECT * FROM users";
$dom = $q2x->getXML( $sql,
array(
'rootTag' => 'myroot',
'rowTag' => 'myrow',
'idColumn' => 'id',
'elements' => array('id','password', 'name', 'emai...
'encoder' => false
)
);
header('Content-Type: application/xml');
$xml->formatOutput = true;
print $dom->saveXML();
} catch (Exception $e) {
echo $e->getMessage();
}
?>
<?php
include 'XML/Query2XML.php';
include 'MDB2.php';
try {
$q2x =
XML_Query2XML::factory(MDB2::factory(
'mysql://ishida:app1234@localhost/test'));
$sql = "SELECT * FROM users";
$options =
array(
'rootTag' => 'myroot',
'rowTag' => 'myrow',
'idColumn' => 'id',
'attributes' => array('name', 'email'),
'elements' => array('名前'=>'name', 'メール'=>'ema...
'encoder' => false # 文字化け対策
);
$dom = $q2x->getXML( $sql,$options);
header('Content-Type: application/xml');
$xml->formatOutput = true;
print $dom->saveXML();
} catch (Exception $e) {
echo $e->getMessage();
}
?>
[[ここ:http://www.ibm.com/developerworks/jp/xml/library/x...
終了行:
sudo pear install XML_Query2XML ## --alldeps を忘れた
[sudo] password for ishida:
Did not download optional dependencies: pear/Net_LDAP2,
pear/MDB2, pear/I18N_UnicodeString, use --alldeps to d...
automatically
pear/XML_Query2XML can optionally use package "pear/Net_...
pear/XML_Query2XML can optionally use package "pear/MDB2"
pear/XML_Query2XML can optionally use package
"pear/I18N_UnicodeString"
downloading XML_Query2XML-1.7.1.tgz ...
Starting to download XML_Query2XML-1.7.1.tgz (169,218 by...
.....................................done: 169,218 bytes
install ok: channel://pear.php.net/XML_Query2XML-1.7.1
ishida@app:~/public_html$ sudo pear install --alldeps MDB2
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
..........................done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL dr...
MDB2: Optional feature ibase available (Interbase/Firebi...
MDB2: Optional feature mysql available (MySQL driver for...
MDB2: Optional feature mysqli available (MySQLi driver f...
MDB2: Optional feature mssql available (MS SQL Server dr...
MDB2: Optional feature oci8 available (Oracle driver for...
MDB2: Optional feature pgsql available (PostgreSQL drive...
MDB2: Optional feature querysim available (Querysim driv...
MDB2: Optional feature sqlite available (SQLite2 driver ...
MDB2: To install optional features use "pear install
pear/MDB2#featurename"
ishida@app:~/public_html$ sudo pear install --alldeps MD...
Skipping package "pear/MDB2", already installed as versi...
downloading MDB2_Driver_mysql-1.4.1.tgz ...
Starting to download MDB2_Driver_mysql-1.4.1.tgz (36,481...
..........done: 36,481 bytes
install ok: channel://pear.php.net/MDB2_Driver_mysql-1.4.1
ishida@app:~/public_html$ sudo pear install --alldeps MD...
Skipping package "pear/MDB2", already installed as versi...
downloading MDB2_Driver_mysqli-1.4.1.tgz ...
Starting to download MDB2_Driver_mysqli-1.4.1.tgz (38,06...
..........done: 38,064 bytes
install ok: channel://pear.php.net/MDB2_Driver_mysqli-1....
<?php
// include required files
include 'XML/Query2XML.php';
include 'MDB2.php';
try {
// initialize Query2XML object
$q2x =
XML_Query2XML::factory(MDB2::factory(
'mysql://USER_NAME:PASSWORD@localhost/DB_NAM...
// generate SQL query
// get results as XML
$sql = "SELECT * FROM users";
$dom = $q2x->getXML( $sql,
array(
'rootTag' => 'myroot',
'rowTag' => 'myrow',
'idColumn' => 'id',
'elements' => array('id','password', 'name', 'emai...
'encoder' => false
)
);
header('Content-Type: application/xml');
$xml->formatOutput = true;
print $dom->saveXML();
} catch (Exception $e) {
echo $e->getMessage();
}
?>
<?php
include 'XML/Query2XML.php';
include 'MDB2.php';
try {
$q2x =
XML_Query2XML::factory(MDB2::factory(
'mysql://ishida:app1234@localhost/test'));
$sql = "SELECT * FROM users";
$options =
array(
'rootTag' => 'myroot',
'rowTag' => 'myrow',
'idColumn' => 'id',
'attributes' => array('name', 'email'),
'elements' => array('名前'=>'name', 'メール'=>'ema...
'encoder' => false # 文字化け対策
);
$dom = $q2x->getXML( $sql,$options);
header('Content-Type: application/xml');
$xml->formatOutput = true;
print $dom->saveXML();
} catch (Exception $e) {
echo $e->getMessage();
}
?>
[[ここ:http://www.ibm.com/developerworks/jp/xml/library/x...
ページ名: