Welcome Guest, Not a member yet? Register   Sign In
Netbeans on XP
#1

[eluser]redarc[/eluser]
Replace the hardcoded *nix / to DIRECTORY_SEPARATOR in index.php.

Without this change I found it wasn't possible to step through the code.
#2

[eluser]xwero[/eluser]
A framework shouldn't provide in the needs of a IDE. The IDE should be smart enough to pick it up.

the forward slash is not a *nix only directory separator, it works on windows too. This allows you to have consistent url and file paths.
Code:
site_url('one/two');
$config['upload'] = './uploads';
// VERSUS
site_url('one/two');
$config['upload'] = '.'.DIRECTORY_SEPARATOR.'uploads';
#3

[eluser]marcoss[/eluser]
Actually DIRECTORY_SEPARATOR is preferred over the hardcoded separator (/ in *nixes), because php will determine what to use depending on the underlaying OS, thus making your code more portable.

I tend to use an alias, a shorter/easier to type version, something like DS or _DS.
#4

[eluser]xwero[/eluser]
marcoss the forward slash works on windows and *nix this means the code is portable.
#5

[eluser]redarc[/eluser]
>the forward slash works on windows and *nix this means the code is portable.

So you're suggesting that mixing separators when on winxxxx is good practice, despite it being trivial to be consistent on both platforms? Smile

I disagree, but it's a minor quibble, far less serious than CI's name space pollution. It's also simple to work around.

This forum was my first port of call when I encountered the problem debugging CI. I found nothing related to the problem here. Maybe because the release of netbeans is pretty new? Maybe because nobody cares?

I posted what worked for me so that the next person with the same problem would have a hit.

Discussing stylistic merits/demerits of CI's implementation here is probably not going to be productive, even if it is relevant in regard to the separator being used. Seems that netbeans chokes when it gets a path with mixed separators (e.g. D:\path\to\ci/system). Avoid that and it's a nice debugger.
#6

[eluser]xwero[/eluser]
Is there no option to set the directory separator in netbeans? I did a quick check and it seems netbeans internally uses the *nix separator.




Theme © iAndrew 2016 - Forum software by © MyBB