Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default 'include' php file

    just wondering if anyone may know how to include the attached file into the tpl_main_page.php file without url_include.

    I have tried
    PHP Code:
     
    <?php 
    define
    ("PHP_ROOT""/home/perfo902/public_html/draft/"); 
    include_once(
    PHP_ROOT."banners_all_insert.php"); 
    ?>
    and
     
    <?php 
    define
    ("PHP_ROOT""/home/perfo902/public_html/draft/"); 
    include(
    PHP_ROOT."banners_all_insert.php"); 
    ?>
    and
    <?php require_once('/home/perfo902/public_html/draft/banners_all_insert.php'); ?> 
    and
    <?php 
    define
    ('__ROOT__'dirname(dirname(__FILE__))); 
    require_once(
    __ROOT__.'/config.php); 
    ?> 
    and
    require ("path/to/zencart/banners_all_insert.php'");
    and get the error"PHP Fatal error: Cannot redeclare securityPatchSanitizePostVariableId() (previously declared in /home/perfo902/public_html/draft/includes/extra_configures/security_patch_v138_20080919.php:33) in /home/perfo902/public_html/draft/includes/extra_configures/security_patch_v138_20080919.php on line 54

    if I remove security_patch_v138_20080919.php I get th error
    PHP Fatal error: Cannot redeclare class base in /home/perfo902/public_html/draft/includes/classes/class.base.php on line 17

    I am on a site where I uploaded the zip file and used cannel file manager to unzipd it; which causes additional line spaces on every php file; although this does not normally cause a problem and there are no errors before I try to include this file, i will not do it again.
    Attached Files Attached Files

 

 

Similar Threads

  1. Can't include catalog functions in seperate PHP file.
    By fawad123 in forum General Questions
    Replies: 38
    Last Post: 6 Dec 2017, 07:59 PM
  2. Include a custom php file in mainpage.php
    By BeautyHealth.com.cy in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 8 Nov 2010, 02:45 PM
  3. I cant get the php include statement to work in the tpl_header file.
    By buxton1 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Oct 2009, 12:16 AM
  4. cant include template file?
    By END3RL3 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 13 Oct 2009, 08:50 PM
  5. How can I include a php file in the header section?
    By Andy_R in forum General Questions
    Replies: 3
    Last Post: 11 Sep 2009, 05:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg