954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

include function not working URGENT!

[PHP] <?

include("$include_path/FastTemplate.php3");
$tpl = new FastTemplate("templates");
$tpl->no_strict();


[/PHP]

can someone help me!! plz

inxs310
Newbie Poster
4 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

there was no given error, it just said something that one of my coders typed in....so i got it to work and then i was trying to get the thumbnails to work and then next thing i know blank page....

www.photoblinger.com/old/index1.php and www.photoblinger.com/old/index2.php

<?php
ini_set("session.auto_start","1");
//echo("Working???");
require("./admin/config.php");
//echo("After config.php");
include("./include/common.php");
include("./include/blue.php");
include("./include/doc_head.php");
include("./include/styles.php");


thats just an example of what i saw

inxs310
Newbie Poster
4 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

Isn't the syntax of include?

include "<em>filename</em>"
Puckdropper
Posting Pro
500 posts since Jul 2004
Reputation Points: 23
Solved Threads: 23
 

Either syntax is fine.

I included a function file and got a blank page as a result. Turns out I'd declared the same function twice which caused the blank page, with no error or warning messages.

Just a thought...

brent635
Newbie Poster
1 post since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

Maybe problem is here:
at first line: start tag should be full: <?PHP or at second line.

<?<strong>PHP</strong>
<strong>include($include_path . "/FastTemplate.php3");</strong>
$tpl = new FastTemplate("templates");
$tpl->no_strict();
?>
Yayo_SK
Newbie Poster
11 posts since Jan 2009
Reputation Points: 10
Solved Threads: 1
 

I am facing the same issue. Please take a look at the following code snippets.
SearchForm.php displays correctly if I comment the statement "//require_once 'includes/MessageTransactionReportGenerator.php';". However, if I uncomment it, I get a blank page. No error, no warning. I have included a snippet from MessageTransactionReportGenerator.php below. Note that MessageTransactionReportGenerator also has "require_once 'includes/MessageType.php';" statement.

I havent figured out any solution for that.

I will post back, if I do.

<?php
//file Name : SearchForm.php
    
    require_once 'includes/PossibleValuesFinder.php';
    require_once 'includes/MessageType.php';
    //require_once 'includes/MessageTransactionReportGenerator.php';

...

And MessageTransactionReportGenerator.php looks as follows:

<?php
//file name: MessageTransationReportGenerator/php
require_once "includes/QueryExecutor.php";
require_once "includes/MessageType.php";
...
harshadsm
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

i bet theres an error upon including a file, try using include instead of require coz when require encounters error, the script execution will stop and generate a fatal error, try reading this link for a much detail info http://www.w3schools.com/php/php_includes.asp

vaultdweller123
Posting Pro
554 posts since Sep 2009
Reputation Points: 42
Solved Threads: 75
 
rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 
i bet theres an error upon including a file, try using include instead of require coz when require encounters error, the script execution will stop and generate a fatal error, try reading this link for a much detail info http://www.w3schools.com/php/php_includes.asp


Also, I hate to state the obvious, but are the includes in the the same directory as the calling script? Sometimes the stupidest things can make us crazy.

JRM
Practically a Master Poster
621 posts since Nov 2006
Reputation Points: 130
Solved Threads: 75
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You