Php: Difference between revisions
Jump to navigation
Jump to search
(Created page with "PHP == Koneksi == Database == API == web") |
No edit summary |
||
Line 1: | Line 1: | ||
PHP | PHP | ||
Contoh menampilkan ip address server | |||
<?php | |||
$command = 'ip addr show eth0 | grep -oP "inet \K[\d.]*"'; | |||
$ipaddr = shell_exec($command); | |||
$host = trim($ipaddr); | |||
echo $host; | |||
?> | |||
== Koneksi == | == Koneksi == | ||
Database | Database |
Revision as of 14:11, 20 September 2023
PHP
Contoh menampilkan ip address server
<?php $command = 'ip addr show eth0 | grep -oP "inet \K[\d.]*"'; $ipaddr = shell_exec($command); $host = trim($ipaddr); echo $host; ?>
Koneksi
Database
API
web