Avatar of imaan assadi
imaan assadi
 asked on

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

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);
    fclose($fp);

    if(!get_magic_quotes_gpc())
    {
    $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);
PHPMySQL Server

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ray Paseur

stale question
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23