hass1980 Posted April 21, 2009 Share Posted April 21, 2009 Hi im having trouble displaying the templates on my index.php. All im getting is the following displayed. templatedir/header.php"); ?> Hello and welcome to MyMarket! This is the homepage, web masters, use this area: * Provide a basic map of the site * Advertise your on-sale items * Welcome customers to your site * Do useful things To begin shopping, go to the shopping page or buy the on-special items to your right. Your shopping cart is always visible on the left side of your screen. Click it to edit the contents of your basket or to check out. templatedir/footer.php"); ?> here is the index.php code <? include("application.php"); $DOC_TITLE = "MyMarket Home"; include("$CFG->templatedir/header.php"); ?> <table width=100%> <tr valign="top"> <td class=normal> Hello and welcome to MyMarket! This is the homepage, web masters, use this area: <ul class=normal> <li>Provide a basic map of the site</li> <li>Advertise your on-sale items</li> <li>Welcome customers to your site</li> <li>Do useful things</li> </ul> <p>To begin shopping, <a href="shopping/">go to the shopping page</a> or buy the on-special items to your right. Your shopping cart is always visible on the left side of your screen. Click it to edit the contents of your basket or to check out. </td> </tr> </table> <? include("$CFG->templatedir/footer.php"); ?> here is the application.php which holds the configuration settings $CFG->wwwroot = "http://localhost/mymarket"; $CFG->dirroot = "/mymarket"; $CFG->templatedir = "$CFG->dirroot/templates"; $CFG->libdir = "$CFG->dirroot/lib"; $CFG->imagedir = "$CFG->wwwroot/images"; Link to comment https://forums.phpfreaks.com/topic/155103-help-cant-display-templates/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 21, 2009 Share Posted April 21, 2009 Stop using lazy-way short open tags <? and <?= They don't work on every server as you just found out. Always use full php tags <?php and <?php echo Link to comment https://forums.phpfreaks.com/topic/155103-help-cant-display-templates/#findComment-815873 Share on other sites More sharing options...
hass1980 Posted April 21, 2009 Author Share Posted April 21, 2009 ok, still its not working Link to comment https://forums.phpfreaks.com/topic/155103-help-cant-display-templates/#findComment-815877 Share on other sites More sharing options...
PFMaBiSmAd Posted April 21, 2009 Share Posted April 21, 2009 Yes but what is it doing? Did anything change in the "view source" in the browser? If you are seeing raw php code in your browser from a .php file, either php is not installed correctly or you are not browsing to the file through the web server. Are you sure the file ends in .php and not .php.txt? Do any .php files work? What URL are you using in your browser? Link to comment https://forums.phpfreaks.com/topic/155103-help-cant-display-templates/#findComment-815899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.