How to redirect user to another URL in PHP
Answer:
Assume you have a redirect.php, and want to redirect user to Google, use the following codes:
<?php
header("Location: http://www.google.com");
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to redirect user to another URL in PHP
Answer:
Assume you have a redirect.php, and want to redirect user to Google, use the following codes:
<?php
header("Location: http://www.google.com");
How to clear the screen in Linux
Answer:
Use the clear command
# clear
How to print current Unix timestamp
Answer:
Using Perl,
perl -e 'print time;'
How to display hidden characters in vi / vim
Answer:
In vi / vim, type
set: list
To turn off, type
set: nolist
Convert DOS newlines to Unix format
Answer:
To convert DOS newlines (CR/LF) to Unix (LF only), use sed, which can be found on most platforms.
sed "s/\r//" input.txt > output.txt