php - I need to loop a check - not sure how -


i have script uploads file given directory. when file uploaded need launch second script.

this code used in '$newfile' variable location/name of uploaded file.

if (isset($_post['submitbtn'])) {  if(file_exists($newfile)) {  include ('nextscript.php');  } } 

this works small files, larger files (5mb) fails apparently because file_exists check being done (ie before file completes uploading).

i read 'sleep()' function can used delay , loop checks not understand how use it.

can explain how might able use in situation?? - or there different more suitable method delay check or loop until file finishes uploading?


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -