[PHP-DB] Can't Upload ram file
the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help?
RE: [PHP-DB] Can't Upload ram file
show code, maybe checks are being done to only allow images or certain extensions... Bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Can't Upload ram file Date: Fri, 18 Nov 2005 06:19:24 -0800 the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Can't Upload ram file
? $uploadDir = 'media/'; if(isset($_POST['upload'])) { $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; // the files will be saved in filePath $filePath = $uploadDir . $fileName; $result = move_uploaded_file($tmpName, $filePath); if (!$result) { echo Error uploading file; exit; } if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); $filePath = addslashes($filePath); } $username=; $password=; $database=; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( Unable to select database); $query = INSERT INTO upload2 (name, size, type, path ) . VALUES ('$fileName', '$fileSize', '$fileType', '$filePath'); mysql_query($query) or die('Error, query failed : ' . mysql_error()); include 'library/closedb.php'; echo brFile uploadedbr; } ? On 11/18/05, Bastien Koert [EMAIL PROTECTED] wrote: show code, maybe checks are being done to only allow images or certain extensions... Bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Can't Upload ram file Date: Fri, 18 Nov 2005 06:19:24 -0800 the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help?
Re: [PHP-DB] Can't Upload ram file
here is the code ? $uploadDir = 'media/'; if(isset($_POST['upload'])) { $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; // the files will be saved in filePath $filePath = $uploadDir . $fileName; $result = move_uploaded_file($tmpName, $filePath); if (!$result) { echo Error uploading file; exit; } if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); $filePath = addslashes($filePath); } $username=; $password=; $database=; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( Unable to select database); $query = INSERT INTO upload2 (name, size, type, path ) . VALUES ('$fileName', '$fileSize', '$fileType', '$filePath'); mysql_query($query) or die('Error, query failed : ' . mysql_error()); include 'library/closedb.php'; echo brFile uploadedbr; } ? On 11/18/05, Bastien Koert [EMAIL PROTECTED] wrote: show code, maybe checks are being done to only allow images or certain extensions... Bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Can't Upload ram file Date: Fri, 18 Nov 2005 06:19:24 -0800 the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help?
Re: [PHP-DB] Can't Upload ram file
Perhaps it's not file type that is the problem, but file size? -Micah On Friday 18 November 2005 6:19 am, Mohamed Yusuf wrote: the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php