Announcement

Collapse
No announcement yet.

PHP within Template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP within Template

    I have added a PHP script into Act_sectionline but it is not running. I tested using echo statements. It appears as though PHP is being ignored.

    I have tried below from an earlie post reply by Norman.

    You should go to View / Search Settings / Results and turn off "Highlight Located Text". Failing to do this will pass pages accessed via the search results through a Perl script and PHP code won't be interpreted.

    This did not make any difference.

    Thanks

    #2
    Make sure that your generated pages end in .php, php3, or whatever your server expects. Also my note above implies that this just won't work on Business sites as all logged-in custromers get their pages served via Perl scripts, thus bypassing any PHP interpretation.

    You can mix PHP and Actinic OK. See http://www.drillpine.biz/v7php-test/...c_Products.php where the page is being delivered in various views via PHP.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman,

      At the moment I am just trying to get a simple PHP script to work by embedding the text below into the template:

      <?php echo "test line"; ?>

      The generated html looks fine but it does not display. I am using Actinic Business V7.01.

      PHP scripts outside actinic are running fine on this server.

      Any other help appreciated.

      Thanks.

      Comment


        #4
        I must be missing something.

        Is it possible just to add the following code to a template (ie Act_sectionline) and it will be interpreted properly.

        <?php echo "line 1" ?>


        Or is there some other way to achieve PHP code to be interpreted within a template.

        Thanks.

        Comment


          #5
          As I said earlier, your pages have to be identified to the server as PHP pages, in order for that to happen. This is usually done by them ending in .php or .php3, etc.

          For Actinic pages, you usually do this via selecting the Section then Section Details / Layout / Page Name.

          Have you done that?

          An example URL of a faully page might help.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Norman,

            Once again, thanks for your help. Its sorted.

            Comment

            Working...
            X