Created
October 25, 2016 15:36
-
-
Save ThinkZ/25c135f20b6ff92723ca9e97bbd4ab85 to your computer and use it in GitHub Desktop.
PHP example
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 | |
$conn= mysql_connect("localhost","root","") or die("connect failed"); | |
mysql_select_db("thinkz"); | |
$result= mysql_query("select * from TEST") or die(mysql_error()); | |
while ($myrow = mysql_fetch_row($result)) { | |
printf("%s __ %s __ %s __ %s <p>", $myrow[0], $myrow[1], $myrow[2], $myrow[3]); | |
} | |
?> | |
<?php | |
echo "<br>"; | |
$i = 'http://www.ip138.com/ips138.asp?ip='.$_SERVER["REMOTE_ADDR"].'&action=2'; | |
$j = $_SERVER["REMOTE_ADDR"]; | |
echo '<a href="'.$i.'">'.$j.'</a>'; | |
?> | |
<script type="text/javascript">document.write ("<p>"+navigator.userAgent+"<p>");</script> | |
<a href="http://httpd.apache.org/docs/2.4/"> Apache2.4 online docs </a> | |
<?php | |
echo phpinfo(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment