Php generate random severeal numbers one time
srand((double)microtime()*1000000); $random_number1 = rand(1,60); echo (â€$random_number1 “); $random_number2 = rand(1,60); echo (â€$random_number2 “);
Study PHP Skills, Share PHP Code
srand((double)microtime()*1000000); $random_number1 = rand(1,60); echo (â€$random_number1 “); $random_number2 = rand(1,60); echo (â€$random_number2 “);
function isLowerCase($char){ if(chr($char)>=97 AND chr($char)
can build many web sites, with one web host, one site with one different domain, just using php, it can make you very happy, save your money. $arrays=array( ’www.money.com’=>’money/index.html’, ’www.insurance.com’=>’insurance/index.html’, ’www.car.com’=>’car/index.html’, ’www.travel.com’=>’travel/index.html’, ’127.0.0.1’=>’forum/index.php’, ); $url = $arrays[$_SERVER[’HTTP_HOST’]]; Header(â€Location: $urlâ€); ?>
: I’ve had a hyperlink problem in my Excel files for ages: false hyperlinks had crept in (even in empty cells) and were multiplying regularly whenever I inserted new lines. How can I delete all hyperlinks in a sheet at… Read moreDelete all hyperlinks on a sheet in Excel 2003/XP/2000/97
To remove a single hyperlink without losing the display text or image, right-click the hyperlink, and then click Remove Hyperlink. To remove all hyperlinks in a document, press CTRL+A to select the entire document and then press CTRL+SHIFT+F9.
/*random function $length: length of needed number */ function random($length) { $hash = â€; $chars = ‘0123456789′; $max = strlen($chars) – 1; mt_srand((double)microtime() * 1000000); for($i = 0; $i < $length; $i++) { $hash .= $chars[mt_rand(0, $max)]; }
Sometimes we want to remove hyperlinks with anker text, sometimes only keep anker text, how to use php to achive this? First, only remove hyperlink, and keep anker text part, the code is: $text = ‘Test paragraph.’;
— Renames a file or directory Description bool rename ( string $oldname , string $newname [, resource $context ] ) Attempts to rename oldname to newname .
If we need to rename all .html to .htm, we can use DOS command: ren For example, we need to rename all the .html files under E:\dns\aagg,
Description int fwrite ( resource $handle , string $string [, int $length ] ) fwrite() writes the contents of string to the file stream pointed to by handle .