Network Commands in Linux
Posted onLinux commands , Networking in linux
Linux commands , Networking in linux
laravel and php artisan
古之欲明明德於天下者,先治其國 欲治其國者,先齊其家 欲齊其家者,先修其身 欲修其身者,先正其心 欲正其心者,先誠其意 欲誠其意者,先致其知 致知在格物
<?php date_default_timezone_set(‘Asia/Tehran’); // your time zone echo date(‘e’); //check time zone echo date(“F j, Y, g:i a”); // check current time and date of this city ?>
# mv /etc/localtime /etc/localtime.backup it will create a backup for current time of the system # ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime by this command you make the soft link to your local time zone #date check your new time by this command
#mysqldump -u root –password=12345 MyDatabase > MyBackup.sql For example User is root , Password is 12345 and Database name is MyDatabase Your backup will create in current path (check with “pwd” command) and the name of Backup file is MyBackup.sql (check “ls -lh” command to see)
<?php $ftp_server = “ftp.domain.com”; /// or you can use ip address $ftp_conn = ftp_connect($ftp_server,”21″) or die(“Could not connect to $ftp_server”); $login = ftp_login($ftp_conn, “user”, “password”); $file = “t.html”; // upload file if (ftp_put($ftp_conn, “iman.txt”, $file, FTP_ASCII)) { echo “Successfully uploaded $file.”; } else { echo “Error uploading $file.”; } // close connection ftp_close($ftp_conn); FTP port […]