this is error message I'm trying to fix the copy function does not run. This my code:
<?php
if( $_FILES['file']['name'] != "" ) {
copy( $_FILES['file']['name'], "php5/image" ) or die( "Could not copy file!");
} else {
die("No file specified!");
}
?>
<html>
<head>
<title>Uploading Complete</title>
</head>
<body>
<h2>Uploaded File Info:</h2>
<ul>
<li>Sent file: <?php echo $_FILES['file']['name']; ?>
<li>File size: <?php echo $_FILES['file']['size']; ?> bytes
<li>File type: <?php echo $_FILES['file']['type']; ?>
</ul>
</body>
</html>
Why it doesn't work? How to fix it?
I'm getting
Warning: copy(feel_like_doraemon.jpg): failed to open stream: No such file or directory