Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

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);