Jump to content

JoeSalmi

New Members
  • Posts

    4
  • Joined

  • Last visited

JoeSalmi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. you might be able to change it in your .htaccess file but I don't know what all is going on with your site and what it's trying to do. See if this helps you any. http://code.tutsplus.com/tutorials/using-htaccess-files-for-pretty-urls--net-6049
  2. I also just looked at it in Chrome & Firefox, not off on my end either.
  3. Currently I am grabbing the file names by using straight PHP code and opendir("./movies"); My problem is I have files over 2 gigs and I am getting errors galore AND I can't use pagination to lower the amount shown on each page... I did find a snippet to display filesize over 2GB but now I am having an issue displaying fileatime with files over 2GB function showsize($file) { if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { if (class_exists("COM")) { $fsobj = new COM('Scripting.FileSystemObject'); $f = $fsobj->GetFile(realpath($file)); $file = $f->Size; } else { $file = trim(exec("for %F in (\"" . $file . "\") do @echo %~zF")); } } elseif (PHP_OS == 'Darwin') { $file = trim(shell_exec("stat -f %z " . escapeshellarg($file))); } elseif ((PHP_OS == 'Linux') || (PHP_OS == 'FreeBSD') || (PHP_OS == 'Unix') || (PHP_OS == 'SunOS')) { $file = trim(shell_exec("stat -c%s " . escapeshellarg($file))); } else { $file = filesize($file); } if ($file < 1024) { return $file . ' Byte'; } elseif ($file < 1048576) { return round($file / 1024, 2) . ' KB'; } elseif ($file < 1073741824) { return round($file / 1048576, 2) . ' MB'; } elseif ($file < 1099511627776) { return round($file / 1073741824, 2) . ' GB'; } elseif ($file < 1125899906842624) { return round($file / 1099511627776, 2) . ' TB'; } elseif ($file < 1152921504606846976) { return round($file / 1125899906842624, 2) . ' PB'; } elseif ($file < 1180591620717411303424) { return round($file / 1152921504606846976, 2) . ' EB'; } elseif ($file < 1208925819614629174706176) { return round($file / 1180591620717411303424, 2) . ' ZB'; } else { return round($file / 1208925819614629174706176, 2) . ' YB'; } } I'm am having a hard time finding people to help get where I need to be so any help anyone can give would be greatly appreciated. I think what I am trying to do is use a php code to get mysql to get all the data for me from the server. Then I would like to use all the data in the database to paste back onto the site. That way the page isn't trying to load all the actual files and stuff, only when someone clicks the link to download it. I might not need to do it that way so if someone would like to talk 1 on 1 I would be more than happy doing it that way to try and explain myself better. Send me a message and we can chat live via facebook or something else.
  4. Can someone please help me with this. I'm pulling my hair out. I have manually uploaded videos via FTP into a folder on my website and I am trying to get a code that I can use with a button that will tell my database to update it with all the current files... then display the files on the page. Can anyone help? I have the database all set up and what I need to do is get is the movie name, upload date, and the file size into the database FROM the folder I have all the movies in. That way I can repull that information from the database back into the website and display it all. Currently I am displaying all the files in the folder onto a webpage and it's starting to get laggy and time consuming to load. Not to mention I have plans on using some sort of pagenation to help with load times. Let me know if anyone still doesn't understand my endgame here. I'm not sure I am exactly explaining this the right way. Joe
×
×
  • 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.