Created
August 6, 2018 22:16
-
-
Save paveltretyakovru/b211efc0e6d246aceba9be8d9671ba33 to your computer and use it in GitHub Desktop.
PHP terminal application with a i/o fuctionality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "Welcome to the OZ-TZ init script \n"; | |
$f_db_host = fopen ("php://stdin","r"); | |
$f_db_dbname = fopen ("php://stdin","r"); | |
$f_db_username = fopen ("php://stdin","r"); | |
$f_db_userpassword = fopen ("php://stdin","r"); | |
echo "Type DB host: "; | |
$db_host = fgets($f_db_host); | |
echo "\n"; | |
echo "Type DB name: "; | |
$db_dbname = fgets($f_db_dbname); | |
echo "\n"; | |
echo "Type DB user name: "; | |
$db_username = fgets($f_db_username); | |
echo "\n"; | |
echo "Type DB user password: "; | |
$db_userpassword = fgets($f_db_userpassword); | |
echo "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment