GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP guys- i need help.. its a small thing (https://gfy.com/showthread.php?t=840519)

tehHinjew 07-10-2008 11:36 AM

PHP guys- i need help.. its a small thing
 
I am looking for a solution to a news ticker that I use on my site...

Take the following in mind my site uses 1000 plus pages and the ticker is on every page and the pages are in folders.

I used to use <?PHP include("http://site.dotcom/ticker.php");?>

and i tried <?php include($_SERVER['DOCUMENT_ROOT'].'/updates.php'); ?> and it doesnt work... I still get the error you can see this via ffgenesis.com I am testing it on an old site .

This no longer works anymore, I am looking for a simple way to solve this issue once again and not a big code considering its a tiny code already.

Thanks in advance,

P.S If I sound stupid it been a while since I've coded I may be out of date for 2 years.

mike-al 07-10-2008 11:47 AM

the use of fopen requires a setting in php.ini that may be disabled

fopen opens files locally or via extenals calls <-- which i am guessing is your problem
since you are using a http:// in your include and this feature may be disabled as its a security concern

Varius 07-10-2008 01:28 PM

Mike is right above, if it's your box change the value in php.ini

If it's a host where you don't have access try putting in your php file

ini_set('allow_url_fopen', TRUE);

however there are a few settings ini_set doesn't have permission to change and this *may* be one of those.

However, I recommend using Smarty or another template engine for PHP to begin with, so you keep your PHP and HTML nice and clean and seperate.


All times are GMT -7. The time now is 10:13 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123