|
|
 JJ | 2012-12-22 22:05:50 |
thanks for this script it works great with my linux box. I had a questions/suggestion. Once processed the files show up in the MYSQL table as file name /var/www/html/mp3/"filename.mp3" my index.php is under html. is there anyway to create the upload without the /var/www/html? i'd like to keep /mp3/filename.mp3 only with everything else.
Thank you
John |
| |
2. Re: Upload filename |
|
Reply |
|
|
 Nadir Latif | 2012-12-22 23:24:48 - In reply to message 1 from JJ |
Hello...the file name is added in 2 tables. to update the file name so it does not contain the document root of your site, try the following:
-for the mp_admin_errors table add str_replace($_SERVER['DOCUMENT_ROOT'],"",$file_path); just above the line: $file_name=$this->log_folder.$this->path_symbol.date("Y-m-d").".txt"; .
-for mp_id3_tags table add str_replace($_SERVER['DOCUMENT_ROOT'],"",$mp_file_path); just above $database=new clsTbsSql();
Hope that helps,
Nadir Latif |
| |
3. Re: Upload filename |
|
Reply |
|
|
 JJ | 2012-12-24 02:21:57 - In reply to message 2 from Nadir Latif |
| Nope that didnt help. It still add /var/html/mp3 to each processed file. |
| |
4. Re: Upload filename |
|
Reply |
|
|
 Nadir Latif | 2012-12-24 06:46:21 - In reply to message 3 from JJ |
| ok, in which table do you see /var/html/mp3 |
| |
5. Re: Upload filename |
|
Reply |
|
|
 JJ | 2012-12-25 00:19:51 - In reply to message 4 from Nadir Latif |
| in the Mp3_id3_tags table... |
| |
6. Re: Upload filename |
|
Reply |
|
|
 Nadir Latif | 2012-12-25 00:53:49 - In reply to message 5 from JJ |
ok you have to remove the string you dont want in your table (i.e /var/www/html/mp3). the following should work:
add this line:
str_replace("/var/www/html/mp3","",$mp_file_path);
just above $database=new clsTbsSql(); |
| |
7. Re: Upload filename |
|
Reply |
|
|
 JJ | 2012-12-25 22:07:29 - In reply to message 6 from Nadir Latif |
| i dont understand why its not working. I tried what you said and it still doesnt work. Can you update the code and i can re-download and setup? |
| |
8. Re: Upload filename |
|
Reply |
|
|
 Nadir Latif | 2012-12-26 01:55:58 - In reply to message 7 from JJ |
Hi...please try the following:
add the line:
$mp_file_path=str_replace("/var/www/html/mp3","",$mp_file_path);
just above the line:
$database=new clsTbsSql();
if it doesnt work then i can email you the updated code |
| |
9. Re: Upload filename |
|
Reply |
|
|
 JJ | 2012-12-27 17:55:56 - In reply to message 8 from Nadir Latif |
nope that still dint work. Please email be an updated code.
Thank you very much for your help |
| |
10. Re: Upload filename |
|
Reply |
|
|
 Nadir Latif | 2012-12-28 04:30:00 - In reply to message 9 from JJ |
| Hi...let me know your email address and i'll email the update code. |
|