Created
          April 26, 2012 01:07 
        
      - 
      
 - 
        
Save ha1t/2494961 to your computer and use it in GitHub Desktop.  
    nameの文字列がaを何回インクリメントすると表現できるかしらべるものっぽい 
  
        
  
    
      This file contains hidden or 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 | |
| /** | |
| * nameの文字列がaを何回インクリメントすると表現できるかしらべるものっぽい | |
| */ | |
| ini_set('max_execution_time', 5); | |
| if ( !isset($_POST['name']) ) { | |
| $str = <<<EOD | |
| <form method="post"> | |
| name<input type="text" name="name" /> | |
| <input type="submit" /> | |
| </form> | |
| EOD; | |
| print($str); | |
| } else { | |
| $a = 'a'; | |
| $i = -1; | |
| while($a != $_POST['name']){ | |
| $i++; | |
| $a++; | |
| } | |
| print('<hr>'); | |
| print('php -r' . '\'$a="a"; for($i=0;$i<=' . $i .';$i++)'.'{$a++;}' . ' print "$a\n";\''); | |
| print('<hr>'); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
昔書いたコードはこのようにファイル名も適当でコメントもないし何がしたいのかぜーんぜんわからないひどいものが多いですね:shit: