问题答案:https ://stackoverflow.com/a/16721000/2217905
<?php
if(isset($_POST["act"])) {
$uname = $_POST['username']; //Username
$uname = str_replace(array('!','"','£','$','%','%','^','&','*','(',')','-','+','=','\\','/','[',']','{','}',';',':','@','#','~','<',',','>','.','?','|',' '), '', $uname);
// Set some variables and values that you want to be propogated through the URL
$variable['1'] = $_POST['username'];
// We now set the base of the dynamic link
$link = "http://yunodev.com/skinstealer.php";
// Add on a question mark to the link, to identify that variables are now being set
$link .= "?";
// Lets add on our first variable to the link
$link .= $variable['1'];
}
?>
<!-- THIS PAGE IS skinstealer.php -->
<html>
<head>
<title>Minecraft Skin Stealer - Image View</title>
</head>
<body>
<img src="http://s3.amazonaws.com/MinecraftSkins/<?php echo $uname; ?>.png" width="800" height="400" alt="Error">
<p><b>Image scaled by 800x400pixels. Will be much smaller, and no blur when downloaded.</b></p>
<p><a href="http://s3.amazonaws.com/MinecraftSkins/<?php echo $uname; ?>.png">Download Skin</a></p>a
这是我现在拥有的代码,基本上我想要的是当用户访问链接时:http ://example.com/skinstealer.php?id=Laim它显示了该皮肤。如果这是有道理的。
以前从未做过变量,所以这对我来说是新事物。
乔治评论后编辑
目前我得到的(如果我回显)是http://example.com/skinstealer.php?laim 如果我去那个链接,它只会显示我的错误图像。如果需要,我可以上传现场演示。