pluck
pluck 4.7 out now, download it today!

pluck support forums

for all your questions about the easiest CMS on the planet

You are not logged in.

Announcement

New registrations are disabled for some spam problems. New registrations will be avaliable soon. If you want to help to keep forum away from spam - contact us.
Please post your bug reports on Launchpad.

#1 28-03-2010 13:14:33

a_bach
developer/module guru
From: Poland
Registered: 24-11-2008
Posts: 439
Website

Defined variables

2 questions:

Why we are using (file.php) instead of (./file.php) type in including and functions?

data/inc - 28 hits
data/settings/pages - 79 hits

So, why we dont add 3 more variables:

define('INC_DIR', './data/inc/);
define('PAGES_DIR', './data/settings/pages/);
define('MODULES_DIR', './data/settings/modules/);

Chars / at the end and ./ at the begining are intended.

A_Bach

Offline

#2 31-03-2010 13:31:34

Sander
project webmaster
From: The Netherlands
Registered: 14-06-2007
Posts: 942
Website

Re: Defined variables

Yes, I think it's a good idea to add those variables.

Offline

#3 31-03-2010 22:17:26

Spirit55555
developer
From: Denmark
Registered: 09-11-2008
Posts: 227
Website

Re: Defined variables

a_bach wrote:

Why we are using (file.php) instead of (./file.php) type in including and functions?

Is there any reason why we should add ./ ?

Offline

#4 01-04-2010 08:29:24

a_bach
developer/module guru
From: Poland
Registered: 24-11-2008
Posts: 439
Website

Re: Defined variables

Spirit55555 wrote:
a_bach wrote:

Why we are using (file.php) instead of (./file.php) type in including and functions?

Is there any reason why we should add ./ ?

PHP can search for file also in include_path. ./ will prevent for this. I also found information, that using ./ is faster then without.

I'm waiting for your Spirit55555 messaging system. When you merged it with main branch, I will create exprerimental branch with this code for testings.

A_Bach

Offline

#5 01-04-2010 14:19:41

Spirit55555
developer
From: Denmark
Registered: 09-11-2008
Posts: 227
Website

Re: Defined variables

a_bach wrote:

PHP can search for file also in include_path. ./ will prevent for this. I also found information, that using ./ is faster then without.

Okay, good reason for adding it smile

a_bach wrote:

I'm waiting for your Spirit55555 messaging system. When you merged it with main branch, I will create exprerimental branch with this code for testings.

I still need some feedback on it, before I can merge it.

Offline

Board footer

Powered by FluxBB