troubleshooting Question

fopen(C:\wamp64\tmp\php16D0.tmp): failed to open stream

Avatar of imaan assadi
imaan assadi asked on
2 Comments1 Solution192 ViewsLast Modified:
if (is_uploaded_file($_FILES['uploadedfile']['tmp_name']) && $_FILES['uploadedfile']['error']==0){
        $path = 'C:/wamp64/www/uploads/' . $_FILES['uploadedfile']['name'];
    if (!file_exists($path)) {
      if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $path)) {
        echo "The file was uploaded successfully.";
      } else {
        echo "The file was not uploaded successfully.";
      } else {
      echo "File already exists. Please upload another file.";
      } else {
       echo "The file was not uploaded successfully.";
       echo "(Error Code:" . $_FILES['uploadedfile']['error'] . ")";
      // get data from the form html         
      //$bday  = $_POST['bday'];
      $gender = $_POST['gender'];
      //$vehicle1 = $_POST['vehicle1'];
      //$vehicle2 = $_POST['vehicle2'];
      $Filename = $_FILES['uploadedfile']['name'];
    $tmpname  = $_FILES['uploadedfile']['tmp_name'];
    $Filesize = $_FILES['uploadedfile']['size'];
    $Filetype = $_FILES['uploadedfile']['type'];
      echo 'Your designation is ' .$tmpname. '<br>';

    $fp      = fopen($tmpname, 'r');
    $content = fread($fp, filesize($tmpname));
    $content = addslashes($content);

    $Filename = addslashes($Filename);
      $connect = mysqli_connect('localhost','root','','radio') or die (mysqli_connect_error());
      if(!$connect) die("Unable to connect to MySQL").mysqli_error($connect);
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros