Ok heres the form script
<body><h3>Uploader</h3>
Find a file to upload<br/>
<form action="http://www.yoursite.com/uploader.php" method="post"
enctype="multipart/form-data">
<input type="file" name="file" size="50">
<br/>
<input type="submit" value="Upload File">
</form>
</body></html>
ok so i direct to the uploader the uploader code is
<?php
if($file_name !="")
{
copy ("$file", " /var/www/html/uploads/$file_name")
or die("Could not copy file");
}
else { die("No file specified"); }
?>
<html>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
-->
</style>
<body><h3 align="center"><strong>Complete</strong></h3>
<ul>
<li>
<h5 align="center" class="style1">Size: <?php echo "$file_size"; ?> bytes
</h5>
</ul>
<h5 align="center"><a href=http://www.htmlforums.com/archive/index.php/"<?php echo "file:///C|/unzipped/uploader/$file_name" ?>" class="style1">
View file</a>
</h5>
</body></html>
now what do i change that to heres the error
Warning: copy( /var/www/html/uploads/juliia.jpg): failed to open stream: No such file or directory in /var/www/html/upload/uploader.php on line 4
Could not copy file
thx for the helpfirst you have to have uploads set (chmoded) to 777 so you can write to it.
<body><h3>Uploader</h3>
Find a file to upload<br/>
<form action="http://www.yoursite.com/uploader.php" method="post"
enctype="multipart/form-data">
<input type="file" name="file" size="50">
<br/>
<input type="submit" value="Upload File">
</form>
</body></html>
ok so i direct to the uploader the uploader code is
<?php
if($file_name !="")
{
copy ("$file", " /var/www/html/uploads/$file_name")
or die("Could not copy file");
}
else { die("No file specified"); }
?>
<html>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
-->
</style>
<body><h3 align="center"><strong>Complete</strong></h3>
<ul>
<li>
<h5 align="center" class="style1">Size: <?php echo "$file_size"; ?> bytes
</h5>
</ul>
<h5 align="center"><a href=http://www.htmlforums.com/archive/index.php/"<?php echo "file:///C|/unzipped/uploader/$file_name" ?>" class="style1">
View file</a>
</h5>
</body></html>
now what do i change that to heres the error
Warning: copy( /var/www/html/uploads/juliia.jpg): failed to open stream: No such file or directory in /var/www/html/upload/uploader.php on line 4
Could not copy file
thx for the helpfirst you have to have uploads set (chmoded) to 777 so you can write to it.