PHP上传文件到服务器脚本不会上传所有内容

I'm using php and ajax to upload some files to my server, I can upload txt files, images, docs, zips,pdf... I uploaded pdf of size 15mb but when I tried to upload txt size 14mb script crashed Here is my code

<form id="form" action="db/upload.php" method="post" enctype="multipart/formdata">
    <input type="file" name="fileToUpload" id="file">\
    <input type="submit" value="Upload Image" name="submit" id="">\
</form>

JavaScript

//Click event for Upload new File button
$('#edit_window .file_container').on('submit', '#form', function(e) { 
    e.preventDefault();

//Code for uploading file
//get file data
      var file_data = $("#file").prop("files")[0];
      var form_data = new FormData(this);
      form_data.append('file', file_data);
      form_data.append('link', id);

      $.ajax({
        type: 'POST',
        url: 'db/upload.php',
        data:form_data,
        cache: false,
        contentType: false,
        processData: false,
        success: function (data) {
            console.log(data);
        //  $("#feedback").html(data);
        }
      });
    });

PHP

<?php
    session_start();

    //Prevent running the script if no one is logged in
    if(!isset($_SESSION["CurrentUser"]))
            exit();

    $link = $_POST['link'];
    $target_path = "../data/".$link."/";

    $target_path = $target_path . basename( $_FILES[ 'fileToUpload' ][ 'name' ] );

    if ( move_uploaded_file( $_FILES[ 'fileToUpload' ][ 'tmp_name' ] , $target_path ) ){
       echo "Upload complete!";
    } 
    else {
         echo "Error uploading!";
    }

?> 

USER.ini

upload_max_filesize = 40M
post_max_size = 40M
max_execution_time = 10000
max_input_time = 10000

Javascript output

<br />
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: fileToUpload in C:\wamp\www\elmar\db\upload.php on line <i>8</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0020</td><td bgcolor='#eeeeec' align='right'>245888</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='C:\wamp\www\elmar\db\upload.php' bgcolor='#eeeeec'>..\upload.php<b>:</b>0</td></tr>
</table></font>