Created
August 12, 2012 15:43
-
-
Save marty-suzuki/3332369 to your computer and use it in GitHub Desktop.
kadai
This file contains 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 | |
for($i=1; $i<=100; $i++){ | |
if($i%3==0 && $i%5!=0){ | |
print '(」・ω・)」うー!'; | |
} | |
else if($i%5==0 && $i%3!=0){ | |
print '(/・ω・)/にゃー!'; | |
} | |
else if($i%5!=0 || $i%3!=0){ | |
print "$i"; | |
} | |
else{ | |
print "(」・ω・)」うー!(/・ω・)/にゃー!\n"; | |
} | |
print "\n"; | |
} | |
?> |
This file contains 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 | |
$get = $_GET['name']; | |
print $get; | |
?> |
This file contains 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 | |
$get = $_GET['name']; | |
print strip_tags($get); | |
?> |
This file contains 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
「(」・ω・)」うー!(/・ω・)/にゃー!」と入力されることを想定しているため、htmlタブ付きで入力されると正しい表示ができなくなってしまうので、htmlタグを取り除くいう形で対策をする。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment