$descr = str_replace(".torrent","",$name); // just the filename and i wont to add the file path into descr !
PHP Code:
copy("$dir/$files[$i]", "uploads/$id.torrent");if (count($filelist)) { foreach ($filelist as $file) { $dir = ''; $size = $file["length"]; $count = count($file["path"]); for ($i = 0; $i < $count; $i++) { if (($i + 1) == $count) $fname = $dir . $file["path"][$i]; else $dir .= $file["path"][$i] . "/"; } mysql_query("INSERT INTO `files` (`torrent`, `path`, `filesize`) VALUES($id, " . sqlesc($fname) . ", $size)"); } } else { mysql_query("INSERT INTO `files` (`torrent`, `path`, `filesize`) VALUES($id, " . sqlesc($TorrentInfo[3]) . ", $torrentsize)"); }