PHP implementation of interesting character test program examples, PHP character program Example _php tutorial

Source: Internet
Author: User

PHP implementation of interesting character test program instance, PHP character program example


This article is an example of how PHP implements an interesting character testing program. Share to everyone for your reference. The implementation method is as follows:

 
  
 <title>Count your character by Lengfeng brother.</title>
 
  
 
   





Program production: Cold Maple brother ©1.01

<?php/* Character Calculator Author: Chen Wen 2007.11.22 version: 1.01 */function js () {$name = $_get[' name ']; $name =htmlspecialchars ($name); echo " Your name is: ". $name."

"; for ($i = 0; $i < strlen ($name); $i + +) {$a = $a +ord ($name [$i]);} if ($name = = "Gao Fu Shuai") {//Here you can change your name ~ you know ~o (∩_∩) o~ $shuzi = 100;} else{$shuzi = ($a *47+70)%100;} echo $name. " The score is ". $shuzi."

"Function GetValue ($shuzi) {if ($shuzi = = 0) {echo" You must not be a human, are you? " Why not have a character?! ";} ElseIf (($shuzi >0) && ($shuzi <=5) {echo "Forget it, you have no character to talk about ...";} else if (($shuzi > 5) && ($shuzi <=) {echo "I'm not good ... Should not talk to you character problem ... "; } else if ($shuzi > && ($shuzi <=)) {echo "Did you kill anyone?" You should have no evil. } else if ($shuzi > && ($shuzi <=)) {echo "You look like you should have peeped in next door when you were three years old." } else if ($shuzi > && ($shuzi <=)) {echo "It's amazing how your character is so low ..."; } else if ($shuzi > && ($shuzi <=)) {echo "Your character is too bad. You should have a habit of doing bad things, right? else if (($shuzi >) && ($shuzi <=)) {echo "Your character is really poor! Must often do sly things ..."; } else if ($shuzi > && ($shuzi <=)) {echo "You have such a poor character please always pray to Buddha bless you ..."; } else if ($shuzi > <= && ($shuzi)) {echo "honestly. Is it your masterpiece to steal photos that often appear on those forums? ";} else if (($shuzi >) && ($shuzi <= 50)) { echo "Do you have to pee or anything?" } else if ($shuzi > && ($shuzi <=)) {echo "Your character is too poor. You're going to do something bad with a little bit of caution? ";} else if ($shuzi > <= && ($shuzi)) {echo "Your character is very poor. Always refrain from the urge to do bad things, oh ... ";} else if ($shuzi > && ($shuzi <=)) {echo "your character is poorer. To restrain yourself well ... ";} else if (($shuzi > <=) && ($shuzi) {echo "your character barely. To be self-in-the-";} else if ($shuzi > && ($shuzi <=)) {echo "It's good to have a character like you." } else if (($shuzi > <=) && ($shuzi) {echo "You have a good personality. Continue to keep: ";} else if ($shuzi > && ($shuzi <=)) {echo "You're a good character. Should handsome? ";} else if ($shuzi > <=) && ($shuzi) {echo "Your character is really good. Good things should be your hobby. else if (($shuzi > <=) && ($shuzi) {echo "Your character is so good. You are a contemporary living Lei Feng ah ... "; } else if ($shuzi > Up) && ($shuzi <=)) {echo "You are the example of the world!" "; } else if ($shuzi (= +) {echo "Days! You're not human! You are God!!! "; } else {echo "Your character is a negative overflow ... I have no words to you. ";}} GetValue ($shuzi);/* $fp =fopen ("save.php", "A +"), $date =date (y years m D Day h i); $content = "<?php die ();? >| ". $date. "|". $name. "|". $shuzi. " \ r \ n "; fwrite ($fp, $content); fclose ($fp); */}if ($_get[' name ']) JS ();? >

The effect is as follows:

I hope this article is helpful to everyone's PHP programming.

http://www.bkjia.com/PHPjc/1013718.html www.bkjia.com true http://www.bkjia.com/PHPjc/1013718.html techarticle PHP Implementation of an interesting example of character test program, PHP character program Examples of this article describes the PHP implementation of the interesting character test program. Share to everyone for your reference. The concrete implementation method is as follows ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.