Updated index.php
This commit is contained in:
parent
790e83b8fb
commit
ba93280fd6
@ -14,5 +14,18 @@
|
|||||||
<p>Kernel: {{ ansible_facts.kernel }}</p>
|
<p>Kernel: {{ ansible_facts.kernel }}</p>
|
||||||
<p>Memory usage: {{ ansible_facts.memfree_mb }}/{{ ansible_facts.memtotal_mb }}MB</p>
|
<p>Memory usage: {{ ansible_facts.memfree_mb }}/{{ ansible_facts.memtotal_mb }}MB</p>
|
||||||
<p>Python version: {{ ansible_facts.python_version }}</p>
|
<p>Python version: {{ ansible_facts.python_version }}</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
$db_handle = pg_connect("host=192.168.56.16 dbname=test user=postgres password=coolshit");
|
||||||
|
if ($db_handle) {
|
||||||
|
echo "Connection attempt succeeded.\n";
|
||||||
|
} else {
|
||||||
|
echo "Connection attempt failed.\n";
|
||||||
|
}
|
||||||
|
$query = "SELECT m.* FROM test.public.message m";
|
||||||
|
$result = pg_exec($db_handle, $query);
|
||||||
|
var_dump(pg_fetch_all($result));
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user