Forum Moderators: coopster

Message Too Old, No Replies

simple advice of PHP

apreciate a comment (to help me)

         

bbbandit

2:00 pm on Sep 30, 2005 (gmt 0)

10+ Year Member



HI
I have a data base with all the php files, configurate to go to "www.mydomain.com/catalog"
but i want only "www.mydomain.com". its possible to replace "DIR_WS_CATALOG" in this files, change to " ", its a correct procedure? I have 83 php files with different coding like:
(($request_type == 'SSL')? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;?>">

<tr><td>absolute path to picture:</td><td><?php echo DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG. DIR_WS_IMAGES . $banner;?></td></tr>

(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $banner['affiliate_banners_image'], $page_title)

Thanks

ergophobe

5:29 pm on Sep 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If I had to guess, it looks like osCommerce code. In any case, I assume it's not a script you've written yourself.

In that case, your best bet is to go to the forum for the script itself (assuming it has one - osCommerce definitely does) and ask your question there. There is probably a standard way to put your catalog in site root.

In any case, the DIR_WS_CATALOG is clearly meant to be a site-wide configuration. You should not modify 83 files, but find the place where DIR_WS_CATALOG is defined and make a change just in that one config file (or in the DB if it is taking config values from the DB). osCommerce does (or used to - haven't used it in forever) define many constants from the DB, but as a general rule if it is defined in the DB, you should change it via the admin interface, not by changing the DB values manually.

Otherwise, look for code like this

define('DIR_WS_CATALOG', 'catalog/');

and make your changes there. Again, though, I would start by asking on the forum for the script itself.

bbbandit

6:40 pm on Sep 30, 2005 (gmt 0)

10+ Year Member



Thanks, you are right its for ecommerce, im going to forum and look for it.