Jump to content

video upload, rename and save script doesnt work


Lodius2000

Recommended Posts

i have a script that does as the title says with this code

<?php
        //file has been submitted
        //these are the only changes made to the uploaded file

        // This is the temporary file created by PHP
$uploadedfile = $_FILES['uploadfile']['tmp_name'];

//create new filename
$today = date('mdy');
$count = count(glob('../../../video/*' . date('mdy') . '*.*'));
$i = ($count+1);
$new_file = $today . '_vid' . sprintf("%02d",$i) . '.mov';

//rename and write full size file
$filename_full = "../../../video/". $new_file;
rename($uploadedfile, $filename_full) or die('write error');
?>

 

then i embed it into my webpage

 

problem, the video doesnt play. when i embed it the quicktime window comes up as the right size but the white window with the quicktime logo never disapears.

 

intestingly, i pop open my ftp program and download the newly uploaded video, and it plays fine, then I upload the file that i just downloaded via my ftp program and suddenly the video plays fine on the webpage with no changes to the embed coding

 

ideas?

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.