If this is your first visit, check our documentation. To post, register or login.

'include' php file

Started by vandiermen on 5 Sep 2011, 7:22 PM · Views: 1,466

Results 1 to 2 of 2
5 Sep 2011, 7:22 PM
#1
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Post #1 by vandiermen

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 
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.

6 Sep 2011, 4:41 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

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.