Please help me editing this mp3tag editor

Started on the old forum in April 2014 · view the original in the archive · old links redirect here

6 replies · 178 views · started 12 years ago · 1 min read

3 participants
zong11 Developer · 98 posts #1

Anyone plz help me, i m having mp3 tag editor with all songs in one folder by just adding path, but currently facing problem that when i enter path for folder number 1 it edits tags as i want but when i give path of secong folder whos tag is to edit that time tags of 1 folder also get edited . Due to that site name in songs tag comes so many times in folder 1 and so on. So please i have posted index.php so edit in such a way that it shold edit tag of that folder only of which path has given.

<html><head><title>Mp3 Tag Editor</title>

<style>body {
font: 12px Verdana, Arial, Helvetica, sans-serif;
}
input{
border: 1px solid #b90000;
margin: 1px;
}</style>

</head>
<body>
<?php
$docroot = realpath((getenv('DOCUMENT_ROOT') && preg_match('#^'.preg_quote(realpath(getenv('DOCUMENT_ROOT'))).'#', realpath(__FILE__))) ? getenv('DOCUMENT_ROOT') : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', dirname(__FILE__))));
$basedir = '/files/';       
$go=$_REQUEST["go"];
$dir = realpath($docroot.'/'.$basedir);

if($go!="")
{
if(!is_dir($dir))
print "Folder Does not Exist<br>";
else {
require_once('../mp/getid3/getid3.php');
require_once('./func.php');
require_once('./config.php');

        
        
        $ext=array();
        $scan=scanDirectories($dir);
        
        $total=count($scan);
        //print $total;
for($i=0;$i<$total;$i++)
{
$Filename=$scan[$i];
if(stristr($Filename,".mp3"))
{print $Filename.'<br>';
changer($Filename,$img,$change,$replace);
}
//
            

}
}        
}        
        ?><p>
    <b>Enter the path To edit tag</b>
    <p>
    <form align="center"><input type="text" name="dir"/><br/>
    <input type="submit" value="Go" name="go"/>
    </form>

    
    </p></p></body></html>

Always Help Needy Peoples !!!!!

something else Fellow · 2,296 posts #2

$dir = realpath($docroot.'/'.$_REQUEST['dir']);

Note to gumslone: underscore is not visible on line 16 of code

zong11 Developer · 98 posts #4

after doing changes it shows folder not exists. So please tell me what should i do

Always Help Needy Peoples !!!!!

something else Fellow · 2,296 posts #5

Zong try: $dir = realpath($docroot.'/'.$basedir.'/'.$_REQUEST['dir']);

Sorry im guessing as cant see your functions page

Gum: chrome isn't rendering the page the same as your browser

.bbcode_code{ ​ line-height: 14px; }

is causing the problems - i changed it to 15px and worked ok but might want to go to 16px to be on safe side

zong11 Developer · 98 posts #6

no same problem...folder does not exists

Always Help Needy Peoples !!!!!

zong11 Developer · 98 posts #7

this is the entire script please edit and reply me. i m waiting

Always Help Needy Peoples !!!!!

zong11 Developer · 98 posts #8

this is entire script plz edit it n reply

Always Help Needy Peoples !!!!!

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close