Answers for "get server host php"

PHP
1

php get hostname

<?php
echo gethostname(); // may output e.g,: sandie

// Or, an option that also works before PHP 5.3
echo php_uname('n'); // may output e.g,: sandie
?>
Posted by: Guest on April-14-2021
-2

how to host a php server

php artisan serve --host your-ip-add --port 8000

// Example with port
php artisan serve --host 192.168.1.001 --port 8000
Posted by: Guest on January-27-2021

Browse Popular Code Answers by Language