11
EMSguy
Re: php script in a block? not working
  • 2005/6/2 20:32

  • EMSguy

  • Just popping in

  • Posts: 86

  • Since: 2004/9/28


No luck! I give up! I will just continue to use html blocks instead of php,

Thanks everyone but nothing seems to make php work in a block for me.

12
DenDrees
Re: php script in a block? not working
  • 2005/6/2 22:08

  • DenDrees

  • Just popping in

  • Posts: 7

  • Since: 2005/5/25


I use this tag

example:
include_once(XOOPS_ROOT_PATH . '/weer.php');

and it worked perfect.
Maybe this will help you.

13
adrock
Re: php script in a block? not working
  • 2005/6/3 1:19

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


I have had the same problem for over a year now....

case in point... (can't get much more simple than this...but it just doesn't work)

this is the code I have used in the block;

include_once(XOOPS_ROOT_PATH . '/ip.php');

this is a link to the ip.php file... which works;

http://www.adamroark.net/TpM/ip.php

and this is the content of the ip.php file itself;

echo $HTTP_SERVER_VARS['REMOTE_ADDR'];
?>

I've tried it with the default theme...custom themes, etc.

Has anyone ever had it NOT work, and later discovered why?

14
pod
Re: php script in a block? not working
  • 2005/6/3 2:43

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


I remember now! I went through this before, like a year ago. You'll kick yourself it's so obvious why it isnt working...

EMSguy: The file you are trying to include is a .cgi Perl file - of course it won't display as an include in XOOPS because XOOPS renders PHP, not Perl. Likewise you can't include .shtml files and expect them to work.

Make sense?

15
Chris03
Re: php script in a block? not working
  • 2005/6/3 2:48

  • Chris03

  • Quite a regular

  • Posts: 372

  • Since: 2004/2/22


NM mind my post :)

16
EMSguy
Re: php script in a block? not working
  • 2005/6/3 9:47

  • EMSguy

  • Just popping in

  • Posts: 86

  • Since: 2004/9/28


Thanks everyone I am just using java script now in an html block now.

has the same function as the php include: calling a script from another website "allheadlinenews" to render news feeds, in a block.

17
Catzwolf
Re: php script in a block? not working
  • 2005/6/3 9:50

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You could have set the block to html and used an html include, would have saved all the problems :-p

18
peacearena
Re: php script in a block? not working
  • 2005/6/7 5:04

  • peacearena

  • Just popping in

  • Posts: 9

  • Since: 2005/1/5 2


"html include" What is that? My book on html doesn't have that.

19
m0nty
Re: php script in a block? not working
  • 2005/6/7 5:54

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24




or


Login

Who's Online

327 user(s) are online (271 user(s) are browsing Support Forums)


Members: 0


Guests: 327


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits