1 tilqicom Jun 06, 2015 22:28
3 tilqicom Jun 10, 2015 12:24
I see thanks. I guess doing
$rootpath = str_replace("conf/","",$conf_path);
would be fail-safe and easiest way to get it ? (assuming /conf folder has never changed and never will :P) or maybe use a default php method
4 fplanque Jun 10, 2015 22:26
That is $basepath
!!
It's defined like this:
$basepath = preg_replace( '#/'.$conf_subdir.'$#i', '', $conf_path ).'/';
On a normal install, the conf
folder is INSIDE of $basepath
/$baseurl
You should really look into /conf/_advanced.php
5 tilqicom Jun 10, 2015 23:18
back to square 1 :D
$basepath gives = "home/user/mydmn_user/mydomain.com/public_html/blog/" if b2 resides in subfolder
whereas I need "/mydomain.com/public_html/" only, without the "blog/" subfolder part, even if b2 resides in blog subfolder.
That is `$basepath` !!
It's defined like this:
$basepath = preg_replace( '#/'.$conf_subdir.'$#i', '', $conf_path ).'/';
On a normal install, the `conf` folder is INSIDE of `$basepath`/`$baseurl`
You should really look into `/conf/_advanced.php`
6 fplanque Jun 13, 2015 04:20
If you put b2evolution in a subfolder, you know what subfolder you put it into, don't you?
Otherwise, maybe there's a webserver $GLOBALS that can tell you.
But b2evolution doesn't care about how far it is from he webserver root.
7 tilqicom Jun 14, 2015 04:58
I see. yeah I can always work with good old $_SERVER. I was just wondering if there was one stored like $baespath.
`$basepath` gives the path that matches `$baseurl`.
b2evolution doesn't try to play outside that folder.