确定虐待尝试
第一个问题
这是index.php页面
<a href="/rotkanye/" onclick="window.open('rotuj.php', 'newwindow', 'width=300, height=250'); return false;"> <div class="upload-button">
<div class="upload-cover">ZROTUJ SI SÁM!
</div>
</div> <!-- .upload-button --> </a>
此按钮打开rotuj.php,这cotains
<?php Header("Cache-Control: max-age=1, must-revalidate"); if(isset($_FILES['image'])){
$errors= array();
$file_name = $_FILES['image']['name'];
$file_size =$_FILES['image']['size'];
$file_tmp =$_FILES['image']['tmp_name'];
$file_type=$_FILES['image']['type'];
if($file_size > 5097152){
$errors[]='File size must be excately 5 MB';
}
if(empty($errors)==true){
if(move_uploaded_file($file_tmp,"upload/upload/"."juju.png")){
sleep(1);
echo "<script>
window.open('upload/');</script>";
echo "<script>
window.close();</script>";
sleep(1);
}
echo "Prave roto ide!";
}
else{
print_r($errors);
}
}
?>
<html>
<head>
<title>Povedz roticom</title>
<link rel="stylesheet" href="styl1.css" type="text/css">
<style>
h1 {color: white;
left:0;
right:0;
}
</style>
</head>
<body>
<h1>Pridaj rotografiu:</h1>
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="image" />
<input type="submit"/>
</form>
</body>
</html>
上上传按钮
id想知道,代码是d后如何到达rotujeme.eu/upload/index.php一个
和第二个问题是如何上传文件,当你选择你的形象,脚本将上传,命名为juju.jpg和index.php文件中rotujeme.eu/upload/将使用它 我想做到这一点的方式,当你用你自己的文件,只有你可以看到它在下一个窗口中,然后将被删除或重命名
<div id="primaryContainer"> <a class="btn_join_small" href="#" style="float: center;">
<img class="loading_arrow" src="upload/juju.png" />
</a>
这是代码,这是在rotujeme使用上传的图片部分。 eu/upload/index.php
我不明白你在问什么。你能澄清,或者至少张贴一些代码吗? – TricksfortheWeb