I have a question for a php expert....

From: Date: Thu, 10 Jun 2010 05:29:46 +0000
Subject: I have a question for a php expert....
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-8340@lists.php.net to get a copy of this message
Hello, Yes, I have two modules (Book of the Day) & (Deal of the Day) while in the root directory (index.php) includes bookoftheday.php in one column and in another it includes dealoftheday.php from the root I have two seperate folders 1.) dealoftheday & 2.) bookoftheday inside both folders you have images for every day of the week and two config files (module1_settings.php & dealoftheday.php) (module2_settings.php & bookoftheday.php) now the conditional statements have been set in dealoftheday.php & bookoftheday.php and both work properly. My problem is that in each of the dealoftheday.php,bookoftheday.php at the very top I require the settings file for the proper module. Now, when you link directly to them they work fine, however if you include the module into the home page then bam it breaks no images and it displays my if file doesn't exist error. I am new in php and have been asked to create such a script that displays variables depending on the day of the week and I have been playing around with this for hours and don't know who to ask or who can help I went to google and here I am. I would like to say in advance I appreciate any help for this major headache I have; lol..... Top line in each module -------------------------------------------------------------------------------------------------------------------------------------------------- <?php define("_CONFIG_PATH_", "/home/park25/public_html/buyritebooks/dealoftheday/module2_settings.php"); if(file_exists(_CONFIG_PATH_)){require (_CONFIG_PATH_);} else{echo"<b>Error: 1001<br />Module Config file does not exist</b><br /><b>Contact Moore Web Projects for a replacement file</b><br />";} ?> -------------------------------------------------------------------------------------------------------------------------------------------------- Now, something I haven't thought of until now, but as of the moment I am testing this under a sublevel domain so would wildcards have anything to do with my problem? It amazes me that I have figured out the hardest parts to do, but I am stumped on this and cannot get the darn thing to include properly, I would appreciate some instruction as now I am at a loss! Thank You, Clint

« previous php.webmaster (#8340) next »