Jump to content

PHP


cl58

Recommended Posts

I just put the code

<?php include("http://cl58tools.co.cc/footer/footer.php"); ?>

in my index.php file and got the following error(s).

 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/cl58tool/public_html/splash/index.php on line 110

 

Warning: include(http://cl58tools.co.cc/footer/footer.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/cl58tool/public_html/splash/index.php on line 110

 

Warning: include() [function.include]: Failed opening 'http://cl58tools.co.cc/footer/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cl58tool/public_html/splash/index.php on line 110

Link to comment
Share on other sites

but i want to use that file in some files in subdomians. Do I have to copy the directory to each subdomain directory?

 

If your subdomains are being used as addon domains than you will.

 

 

EDIT:

 

I take that back. All you need to do is set the correct relative path. Something like this:

 

<?php
include("/home/cl58tool/public_html/footer/footer.php");
?>

 

or the system path

 

<?php
include("/home/cl58tool/public_html/footer/footer.php");
?>

 

I just tried an include on my addon domain to my main domain without any problems no matter how I accessed that page.

Link to comment
Share on other sites

From u.cl58tools.co.cc

 

Code:

<?php include("/home/cl58tool/public_html/footer/footer.php"); ?>

Warning: include(/home/cl58tool/public_html/footer/footer.php) [function.include]: failed to open stream: No such file or directory in /home/cl58tool/public_html/u/index.php on line 46

 

Warning: include() [function.include]: Failed opening '/home/cl58tool/public_html/footer/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cl58tool/public_html/u/index.php on line 46

Link to comment
Share on other sites

Anyway, is there a reason you don't allow http includes? It's as simple as changing one Boolean in the php.ini file.

 

Probably to keep from including pages from other sites and the relative path is a little quicker than another http request.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...