Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    20
    Plugin Contributions
    0

    Default PHP requires or include

    I need some PHP help please?!

    I've got a page (or rather a news page) I need to display on my homepage. I've done a little test to see if I can bring a test page in from my Common folder and it worked, the code was as follows: <?php require($template->get_template_dir('test.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/test.php');?>

    The page in question is called shownews.php and needs to come from a folder called Freshlypeeled on the top level of the website.

    Thanks in advance

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: PHP requires or include

    Try adding code to define_main_page.php via
    zencart admin..

  3. #3
    Join Date
    Aug 2008
    Posts
    20
    Plugin Contributions
    0

    Default Re: PHP requires or include

    I've added the code to define_main_page.php and it works fine but what I need to know is what bits of code do I need to change (in the following line of code - <?php require($template->get_template_dir('test.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/test.php');?>)

    in order to get my page called shownews.php to display on the main page? Sorry if I'm not making much sense but it's confusing me?!

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: PHP requires or include

    Depends what is url of your zencart website...
    so that paths are correct for calling php file required.

  5. #5
    Join Date
    Aug 2008
    Posts
    20
    Plugin Contributions
    0

    Default Re: PHP requires or include


  6. #6
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: PHP requires or include

    And what is EXACT url of php page you wish to show?

 

 

Similar Threads

  1. Replies: 4
    Last Post: 29 May 2016, 03:32 PM
  2. Replies: 2
    Last Post: 16 Oct 2011, 11:27 PM
  3. Include a custom php file in mainpage.php
    By BeautyHealth.com.cy in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 8 Nov 2010, 02:45 PM
  4. Php include
    By ericsc in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 May 2009, 05:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg