![]() |
URL's - Need solution - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: URL's - Need solution (/showthread.php?tid=38827) |
URL's - Need solution - El Forum - 02-20-2011 [eluser]CappY[/eluser] I'm developing my project with winamp plugin and CI for website. I have someclass and somemethod and somemethod accept arguments $user, $key, $artist, $title, $album, $year, $genre. Soo the problem is that $album, $year and $genre sometimes will be empty. But if $year is empty $genre goes as $year argument. Any way to fix this without needing to hack plugin to send something like n/a and in CI if ($year = 'n/a') die(); ? Thanks. ![]() Edit: so far before I started rewriting on CI it was with $_GET['album'] and etc. script.php?album=something&year=something and so on. it look like that: Karas/Fenomeno///genre/ URL's - Need solution - El Forum - 02-20-2011 [eluser]Basketcasesoftware[/eluser] I'm guessing you are using a form and you are trying to get at the information passed by it? And how are you trying to store this information? Database? Directory structure? What is it you want to do, what do expect to see, and what are you actually seeing (paraphrasing InsiteFX some there)? URL's - Need solution - El Forum - 02-20-2011 [eluser]CappY[/eluser] [quote author="Basketcasesoftware" date="1298255244"]I'm guessing you are using a form and you are trying to get at the information passed by it? And how are you trying to store this information? Database? Directory structure? What is it you want to do, what do expect to see, and what are you actually seeing (paraphrasing InsiteFX some there)?[/quote] Actually I'm getting info from segments. But sometimes 6segment will be empty and segment 7 became segment 6 and my script mess up. URL's - Need solution - El Forum - 02-20-2011 [eluser]Basketcasesoftware[/eluser] How are you setting up the segments. Where are they coming from? Are you entering them by hand in your address bar? URL's - Need solution - El Forum - 02-20-2011 [eluser]InsiteFX[/eluser] If you want help you need to explain how you are doing things! What version of CI How you are using segments to get the information etc. Show your code so that we may be able to help you. Please use code tags for code. InsiteFX URL's - Need solution - El Forum - 02-21-2011 [eluser]CappY[/eluser] The segments are entered by winamp plugin. Code: function generate($user = FALSE, $key = FALSE , $artist = FALSE, $title = FALSE, $album = FALSE, $year = FALSE, $genre = FALSE) The goal is that sometimes year maybe empty so $genre is used as $year when actual $year is empty. URL's - Need solution - El Forum - 02-21-2011 [eluser]Basketcasesoftware[/eluser] Does it call the browser or something? The segments are part of an URL which is being used to call your server. You should have your plugin condition the URL better if that's the case. URL's - Need solution - El Forum - 02-21-2011 [eluser]CappY[/eluser] I done it by adding _ symbol if string isEmpty in winamp plugin and added Code: if ($segment == '_') $segment = NULL; But I saw another problem... If the segment contains ( or ) after proccessing image with imageMagick in PHP they are replaced with Code: & # 4 0 ; Code: $this->data = addslashes(urldecode($data)); |