Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: PHP Includes in NOF

  1. #1

    Default PHP Includes in NOF

    Hi,

    This may be one of the dumbest questions for a while ... but ...

    I have installed a script on the server and the various bits and bobs work fine and dandy when I create an iframe and do an absolute reference to the various php scripts.

    All documentation however says to use includes but when I create a text box and CTRL T and insert the include it does nothing when published.

    Question: How do I use includes within NOF?

    TIA
    Ritch
    NOF 2013: (AU1)......Windows 7 Ultimate Version 6.1 (Build 7601:SP1)
    Mac OSX 10.8.3.....Parallels Desktop 8 (8.0.18483)
    iMac 27" 2.7 GHz Intel Core 2 i5.....12Gb 1333 Mhz DDR3

  2. #2
    Senior Member LBA's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    543

    Default

    Have you renamed the page containing the include to have a .php filename extension? If not, in the Page Properties Palette, click Custom Names and change it.

    Laurence

  3. #3

    Default

    Hi Laurence,

    Yes its .php

    Ritch
    NOF 2013: (AU1)......Windows 7 Ultimate Version 6.1 (Build 7601:SP1)
    Mac OSX 10.8.3.....Parallels Desktop 8 (8.0.18483)
    iMac 27" 2.7 GHz Intel Core 2 i5.....12Gb 1333 Mhz DDR3

  4. #4
    Senior Member gotFusion's Avatar
    Join Date
    Jan 2010
    Location
    www.gotHosting.biz
    Posts
    4,529

    Default

    what are you trying to include (post the include statement) ?

    Do you have an online example of it working and not working ?

    Debugging php is virtually imposable without server access as the code gets parsed by the php engine into other executable code.
    NetObjects Fusion Cloud Linux enabled Web Hosting, support + training starts at $14.95
    NetObjects Fusion web Hosting and support + ASP + PHP + ColdFusion + MySQL + MS SQL
    FREE NetObjects Fusion Support & training comes with all web hosting accounts
    NetObjects Fusion Web Hosting: http://www.gotHosting.biz

  5. #5
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    And the syntax you're using for the include is.....?

    Keep in mind... an include sucks the code of the script into your page.... so if the script is doing things like sending headers or blocks of html (ie. html, head, body), that will conflict with the page's code that you're inserting the script code into.
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

  6. #6

    Default

    Hi Mike, Chuck.

    If to go to this link you will see what I have. www.villasur-tenerife.com

    Home page has the include statement ..... <?php include (“search_.php”); ?>

    Test page has the iFrame ..... http:/www.villasur-tenerife.com/search_.php
    Structure is
    /search_php
    /index.php

    Ritch
    NOF 2013: (AU1)......Windows 7 Ultimate Version 6.1 (Build 7601:SP1)
    Mac OSX 10.8.3.....Parallels Desktop 8 (8.0.18483)
    iMac 27" 2.7 GHz Intel Core 2 i5.....12Gb 1333 Mhz DDR3

  7. #7
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    Change your double quotes to single quotes.

    <?php include ('search_.php'); ?>

    <? include 'search_.php'; ?> would work too on most servers.
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

  8. #8

    Default

    Many thanks Chuck.

    That works fine now.

    Ritch
    NOF 2013: (AU1)......Windows 7 Ultimate Version 6.1 (Build 7601:SP1)
    Mac OSX 10.8.3.....Parallels Desktop 8 (8.0.18483)
    iMac 27" 2.7 GHz Intel Core 2 i5.....12Gb 1333 Mhz DDR3

  9. #9

    Default

    Oh dear!

    Spoke too soon.

    It works fine if I do that on the home page but not on a sub page.

    I publish by assets. I have tried relative addressing (I think) but no luck.

    I tried <?php include ('search_.php'); ?> and <?php include ('./search_.php'); ?> and <?php include ('../search_.php'); ?>

    Same link .... properties page.

    Ritch
    NOF 2013: (AU1)......Windows 7 Ultimate Version 6.1 (Build 7601:SP1)
    Mac OSX 10.8.3.....Parallels Desktop 8 (8.0.18483)
    iMac 27" 2.7 GHz Intel Core 2 i5.....12Gb 1333 Mhz DDR3

  10. #10
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    I see the form on your test page, but not the home page or properties page.

    So you already have it working on a page in the HTML folder...
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

Tags for this Thread

Posting Permissions

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