1
parnian
function redirect_header
  • 2005/2/16 6:46

  • parnian

  • Just popping in

  • Posts: 10

  • Since: 2004/12/20


I want to use function redirect_hedear in my new module for post one errormessage like error message in xoops.
but this function dont work and this error show:

Warning: redirect_header(XOOPS_ROOT_PATH/class/template.php): failed to open stream: No such file or directory in c:\htdocs\motahari3\html\include\functions.php on line 385

Fatal error: redirect_header(): Failed opening required 'XOOPS_ROOT_PATH/class/template.php' (include_path='.;c:\php4\pear') in c:\htdocs\motahari3\html\include\functions.php on line 385


can you help me?

2
seb75net
Re: function redirect_header
  • 2005/5/29 23:04

  • seb75net

  • Just popping in

  • Posts: 1

  • Since: 2005/5/24


Hello, I'm not sure but try with XOOPS_URL instead of XOOPS_ROOT_PATH
the syntax should be like this :
redirect_header(XOOPS_URL."/index.php",2, "your message");
param 1 : complète url to the script to be called
param 2 : seconds to display the message
param 3 : your message

good luck,

3
Dave_L
Re: function redirect_header
  • 2005/5/29 23:30

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


It also looks like redirect_header is being called before mainfile.php gets included. That's why the error message displays XOOPS_ROOT_PATH, rather than the value of XOOPS_ROOT_PATH.

Normally the module file should have something like this near the beginning:

require_once '../../mainfile.php';

4
parnian
Re: function redirect_header
  • 2005/5/31 5:44

  • parnian

  • Just popping in

  • Posts: 10

  • Since: 2004/12/20


thanks for your attention .my module install and done successfully.i include this folder before all of my code
include 'XOOPS_ROOT_PATH/mainfile.php'; and
include 'XOOPS_ROOT_PATH/cp_functions.php';

and user redirect header
redirect header(XOOPS_URL."/modules/section_info/template/sath.php",1,_ERRORMESSAGE);

and that done

Login

Who's Online

435 user(s) are online (321 user(s) are browsing Support Forums)


Members: 0


Guests: 435


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