vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Applying Stylesheet to IFRAME contents (https://vborg.vbsupport.ru/showthread.php?t=91261)

deathemperor 07-01-2005 02:15 AM

the page must be save as .php page, .html page won't work.

m0nde 07-01-2005 02:33 AM

Quote:

Originally Posted by deathemperor
the page must be save as .php page, .html page won't work.

I have saved the page as a .php page. The file being called for the IFRAME is text.php and has the following inside it:
PHP Code:

<? require_once('/forums/global.php'); ?>
<html>
<head>
<? echo $style['css']; ?>
</head>
<body>
<span class="alt1"><strong>Blah</strong><br /><br />Blah Blah</span>
</body>
</html>

When I view this text.php in the browser, not trying to view it in the IFRAME, to test it, I get a blank page. I then view the source and get:
PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
<
HTML><HEAD
<
META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD
<
BODY></BODY></HTML

If I just put
PHP Code:

<? phpinfo(); ?>

into my text.php file, to see if anything works at all, I see the php information whether I view it in my IFRAME or if I just view it normally. What is happening with the call to the global.php? Am I doing this wrong?

- Sid

tamarian 07-01-2005 02:54 AM

Sid, this may be a problem of not including global.php You are including it, but the path may be wrong, as it will depend on where your test.php file exist. Try running it in your main forum home first, and remove that '/forum/' directory from the path.

m0nde 07-01-2005 03:06 AM

Quote:

Originally Posted by tamarian
Sid, this may be a problem of not including global.php You are including it, but the path may be wrong, as it will depend on where your test.php file exist. Try running it in your main forum home first, and remove that '/forum/' directory from the path.

Yes, this is what I think is happening. I do know that global.php exists in my /forums directory because if I try http://www.bostonlove.org/forums/global.php it comes up and says
Code:

Critical Error
global.php must not be called directly.

This is very odd. I will try to run it in the same directory as global.php without any path in that line and see what happens.

- Sid

If I move it into the same folder as global.php it suddenly works!

I think I'll just leave it there! Thank you very much for your help.

But, for future reference, can you explain to me why this is happening?

Should I change that line to a relative path?
[php]<? require_once('../global.php'); ?>- Sid

deathemperor 07-01-2005 08:52 AM

Quote:

Originally Posted by m0nde
Should I change that line to a relative path?

both work fine if you use the correct path

m0nde 07-02-2005 08:52 PM

Quote:

Originally Posted by deathemperor
both work fine if you use the correct path

This is inside a module on my vBadvanced CMPS front page. Do you think that this is somehow changing the path?

- Sid


All times are GMT. The time now is 01:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01050 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete