Results 1 to 2 of 2
  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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 'include' php file

    You can't run the single-sidebox addon as an include() or require()

    Either access the file using an iFrame (blech), or write your own custom code to put the content into the page where needed.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR