Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

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.