PHP Help
|
Posted
#36234
(In Topic #8152)
|
|
|---|---|
|
Honoured member |
I've asked this question numerous places, but everyone keeps giving me the same reply, which doesn't work. I've tried: require_once($_SERVER['HTTP_HOST']."/global.php"); require_once($_SERVER['DOCUMENT_ROOT']."/global.php"); include('./global.php'); include('/global.php'); include('global.php'); …etc. |
|
Posted
|
|
|
Honoured member |
|
|
Posted
|
|
|
Honoured member |
|
|
Posted
|
|
Hallowed customer |
I run Otaku Play Ground and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
|
|
Posted
|
|
|
ocStaff (admin) |
Code
$script_dir=dirname($_SERVER['SCRIPT_NAME']);
However at ocProducts we've had our script run on so many servers with faulty PHP versions or bizarre configurations, that we've had to take a different approach. Look at what we do in our index.php files. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
Hallowed customer |
Thanks. I run Otaku Play Ground and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
|
|
Posted
|
|
|
Honoured member |
|
|
Posted
|
|
Hallowed customer |
I run Otaku Play Ground and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
|
|
Posted
|
|
|
Community saint |
Code
<?php include('file_name.php'); ?>
/var/www/htdocs and you want /var/www/htdocs/include_me.php included with /var/www/htdocs/sub_1/sub_2/some_file.php, then /var/www/htdocs/sub_1/sub_2/some_file.php would contain: Code
<?php include('../../include_me.php'); ?>
Code
<?php include('/var/www/htdocs/include_me.php'); ?>
"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved OCP V7 | Advocating monetary reform - FreeOurMoney Need OCP friendly hosting? Look no further: Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal. |
1 guests and 0 members have just viewed this: None
Control functions:








