Say we have a folder domainname.com/somelibrary/library.php
Located in domainname.com/helloworld/someplace/someplace/somephp.php
I want to include that /somelibrary/library.php
A way to do so is to find the relative path. I can do
include_once ('../../../somelibrary/library.php');
But then the include_once statement must change all the time depending on where my file is.
I can try include_once ('/somelibrary/library.php');
It doesn't seem to work.
Warning: include_once(/blablabla/hello.php): failed to open stream: No such file or directory in /home1/romancegua/public_html/russia/test.php on line 2
I am very sure /blablabla/hello.php exist.
It's located at /home1/romancegua/public_html/blablabla/hello.php
So what's my solution?