Jump to content

require_once problem


manx

Recommended Posts

I am trying to use a script that is on another domain to show up a bit of info on one of my blogs' sidebars.  The script creator says to use the following code:

 

<?php require_once 'http://www.domainname.com'; ?>

 

But, when I add it to my sidebar it breaks the template (fatal error?) --

 

I know my hosting allows opening another URL to show info because I can use Popshops code, and other PHP codes that pull in other url's info.

 

Can anyone help me get this line of code to work?  I've tried to add a php.ini with allow_url_include -- didn't help.  Plus I turned globals on in htaccess.

 

BTW -- I am a complete PHP dummy :)

 

Thanks!

Anne

 

Link to comment
https://forums.phpfreaks.com/topic/131808-require_once-problem/
Share on other sites

How are we supposed to help you with such general statements as "a script" and  "my template" and "my sidebar" and "fatal error?"  That's like calling up a mechanic and telling him you want to install " 'something' 'somewhere' in my 'vehicle' but there is 'a problem' "

Link to comment
https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684708
Share on other sites

Hi

 

"Whats the error please."

 

I'm not getting a written error -- I was guessing that it is a "fatal" error because nothing appears on the sidebar after the

inclusion of the code.

 

The script (on a different domain) is a simple script that shows random links on the page.  The problem is not in the script it

is working in that if you put the 'http://www.domainname.com' in your browser, random links appear on this page in the way

should.

 

The problem is the code using 'require_once' -- this php coding is not working on my website as it should ...

 

That is the help I am asking for -- is there something (more php coding) I can add to the code to make it work?  Or, is there a line(s) of code that

needs to be added on another file?

Link to comment
https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684726
Share on other sites

How are we supposed to help you with such general statements as "a script" and  "my template" and "my sidebar" and "fatal error?"  That's like calling up a mechanic and telling him you want to install " 'something' 'somewhere' in my 'vehicle' but there is 'a problem' "

Link to comment
https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684739
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.