Welcome Guest, Not a member yet? Register   Sign In
[Solved] Isset question
#1

(This post was last modified: 04-11-2015, 09:14 AM by wolfgang1983.)

I will try to explain it better.

I have been working on my directory paths. Which now have got working. $this->uri->segment(4) gets the directory name.

In my code below I need to be able to get the previous folders name in the elseif() but don't know how or if there is a better way.

I looked into str_replace(array('../', '..\\', '..'), '', $this->uri->segment(4)), '/'); but did not work.

PHP Code:
// Get's the name of the directory.
$foldername $this->uri->segment(4);

if (isset(
$foldername)) {

// first sub level

$directory FCPATH 'image/catalog' .'/'$foldername '/'// Working

} elseif ($foldername) { // Is finds if folder down level

// How can I get previous folder name
$directory FCPATH 'image/catalog/' .'/'$previousfolder .'/'$foldername '/';

}

} else {

$directory FCPATH 'image/' 'catalog/'// Working


Any suggestions.
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
[Solved] Isset question - by wolfgang1983 - 04-11-2015, 04:37 AM
RE: Isset question - by tildemark - 04-11-2015, 04:42 AM
RE: Isset question - by wolfgang1983 - 04-11-2015, 07:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB