oscommerce file including warning

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

oscommerce file including warning

Post by amir »

i have a file in my root directory i.e. www\index.php
i have another file in www\catalog\includes\column_left.php ( of Oscommerce )

what i wanna do is to include www\catalog\includes\column_left.php into www\index.php, but when i do this, it gives me two warnings

i m including it as include "/catalog/includes/column_left.php";

Warning: include(/catalog/includes/column_left.php) [function.include]: failed to open stream: No such file or directory in D:\AppServ\www\index.php on line 677

Warning: include() [function.include]: Failed opening '/catalog/includes/column_left.php' for inclusion (include_path='.;C:\php5\pear') in D:\AppServ\www\index.php on line 677

any help would be greatly appreciated
thanks in advance
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

try catalog/includes/column_left.php , without leading slash
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

thanks but
errors got change to

Warning: require(DIR_WS_BOXESshopping_cart.php) [function.require]: failed to open stream: No such file or directory in D:\AppServ\www\catalog\includes\column_right.php on line 13

Fatal error: require() [function.require]: Failed opening required 'DIR_WS_BOXESshopping_cart.php' (include_path='.;C:\php5\pear') in D:\AppServ\www\catalog\includes\column_right.php on line 13
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

Did you defined the constant DIR_WS_BOXES ?

Or did you inclued the file in which this constant is defined ?

It should be defined in includes/configure.php and this file should be included into application_top.php, also application_top.php should be included in every page of your oscommerce :)
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

Oh i see you should include the file catalog\includes\application_top.php into www\index.php


But this will change the look of your index.php so there is no way to include column_right.php directly into your index.php. So beter develop a custom script which does similar things like column_right.php, but designed to work on index.php
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

yes all the definitions are in configure.php and its included.
amir
Forum Contributor
Posts: 287
Joined: Sat Oct 07, 2006 4:28 pm

Post by amir »

thanks for your kind assistance, now i am going for oscommerce index.php to customise.
Post Reply