943,971 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4852
  • PHP RSS
Jun 19th, 2006
0

include function not working URGENT!

Expand Post »
[PHP] <?

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


[/PHP]

can someone help me!! plz
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
inxs310 is offline Offline
4 posts
since Jun 2006
Jun 19th, 2006
0

Re: include function not working URGENT!

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 Syntax (Toggle Plain Text)
  1. <?php
  2. ini_set("session.auto_start","1");
  3. //echo("Working???");
  4. require("./admin/config.php");
  5. //echo("After config.php");
  6. include("./include/common.php");
  7. include("./include/blue.php");
  8. include("./include/doc_head.php");
  9. include("./include/styles.php");

thats just an example of what i saw
Reputation Points: 10
Solved Threads: 0
Newbie Poster
inxs310 is offline Offline
4 posts
since Jun 2006
Jun 20th, 2006
0

Re: include function not working URGENT!

Isn't the syntax of include?
include "filename"
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004
Jan 17th, 2009
0

Re: include function not working URGENT!

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...
Last edited by brent635; Jan 17th, 2009 at 9:04 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
brent635 is offline Offline
1 posts
since Jan 2009
Jan 17th, 2009
0

Re: include function not working URGENT!

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

<?PHP
include($include_path . "/FastTemplate.php3");
$tpl = new FastTemplate("templates");
$tpl->no_strict();
?>
Last edited by peter_budo; Jan 18th, 2009 at 2:06 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Yayo_SK is offline Offline
11 posts
since Jan 2009
Jun 29th, 2010
0

PHP "require" statement results ini a blank page

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 Syntax (Toggle Plain Text)
  1. <?php
  2. //file Name : SearchForm.php
  3.  
  4. require_once 'includes/PossibleValuesFinder.php';
  5. require_once 'includes/MessageType.php';
  6. //require_once 'includes/MessageTransactionReportGenerator.php';
  7.  
  8. ...


And MessageTransactionReportGenerator.php looks as follows:

php Syntax (Toggle Plain Text)
  1. <?php
  2. //file name: MessageTransationReportGenerator/php
  3. require_once "includes/QueryExecutor.php";
  4. require_once "includes/MessageType.php";
  5. ...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harshadsm is offline Offline
1 posts
since Jun 2010
Jun 29th, 2010
0
Re: include function not working URGENT!
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
Reputation Points: 32
Solved Threads: 63
Posting Pro
vaultdweller123 is offline Offline
507 posts
since Sep 2009
Reputation Points: 167
Solved Threads: 239
Nearly a Posting Virtuoso
rajarajan07 is offline Offline
1,445 posts
since May 2008
Jul 6th, 2010
0
Re: include function not working URGENT!
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
Reputation Points: 130
Solved Threads: 75
Practically a Master Poster
JRM is offline Offline
618 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Creating a search which collects data from MYSQL Database and displays.
Next Thread in PHP Forum Timeline: [split] project help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC