Announcement

Collapse
No announcement yet.

PHP in Actinic HTML Question

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

    PHP in Actinic HTML Question

    Wonder if anyone can help. I have some code which I want to include in a brochure page - the code includes some php as well as html. When I paste the code in and do preview I can see the html coding works ok but the php doesn't - when I upload to the web the page doesn't appear to have been generated. Is there something specific I need to do to get the php to work?

    I know almost nothing about php and wonder if any kind soul could point me in the right direction to get this to work!

    Thanks in advance

    Kathy
    Kathy Newman

    #2
    Kathy,

    This php to html execution help should solve your problems I suspect

    Cheers,
    Grant

    Comment


      #3
      Kathy,

      If that page isn't your home page (and you're not depending on links to it from search engines) then try renaming it to end in .php via Page Settings / Page Filename.

      That should be all you need to do for the PHP to be executed.

      If search engine links to that page are important to you then see the page Grant referred to.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman - I did change the page name to be .php - when I do an offline preview within actinic I see the actual php code and when I upload and look I get a blank page!

        This page doesn't need to be found by search engines at all.
        Kathy Newman

        Comment


          #5
          Can you show us your code then Kathy.

          Comment


            #6
            Sure can Lee (disclaimer - I did NOT write this code -)
            Attached Files
            Kathy Newman

            Comment


              #7
              It has its own head and body tag as in its a page in its own right. If you want to embed it into a page on your site, you need to get it back to just the inner code. You can't have 2 heads or 2 body tags etc. as your brochure page will already have that for you.

              Comment


                #8
                Thanks Lee - removed the head & body tag and still same result. Back to drawing board I think!
                Kathy Newman

                Comment


                  #9
                  Can we see it live? or the amended code?

                  Comment


                    #10
                    Live doesn't appear - just uploaded the amended code and done view source and there is nothing appearing in the view source. Amended code is below but literally just took out the head & body stuff

                    Probably something really obvious (but struggling today feeling poorly and trying to work - well thats my excuse anyway )
                    Attached Files
                    Kathy Newman

                    Comment


                      #11
                      Kathy,

                      Lets make sure you can run some simple PHP, before trying that humungous add-on.

                      Put this into a Brochure Fragment entry in the Text field.

                      !!<<?php phpinfo(); ?>>!!

                      Save the page with a .php name.

                      Now Upload and look at that page (live site only - Preview won't work) and you should see a lot of info about your servers PHP setup being displayed.

                      Let us know if that happens.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Thanks Norman - that worked got lots of PHP
                        http://www.puddlepetcare.co.uk/acatalog/test_php.php

                        so now to try and work out why the other code isn't working!
                        Kathy Newman

                        Comment


                          #13
                          OK. PHP is go. I'd now look at your code and remove all the stuff that refers to files or images outside your Site folder. All these files and images should be kept directly in your Site folder.

                          E.g.

                          background="images/top-l.gif"

                          becomes

                          background="top-l.gif"

                          and

                          include("http://www.puddlepetcare.co.uk/scratchcard/include/functions.inc.php");

                          becomes

                          include("functions.inc.php");

                          and make sure all these files get uploaded by adding them to Design / Additional Files.
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            Thanks Norman - tried that and it didn't make any difference.

                            What is odd is that when I put in a fragment the code you suggested
                            !!<<?php phpinfo(); ?>>!!

                            I didn't see anything in the actinic preview pane.

                            However when I stripped out all the html and just put in the php for the stuff I'm trying to do I do see this:
                            0) { $p = new pagination(); $p->Items($total); $p->limit($limit); $p->target('winners.php'); $p->currentPage($_GET['page']); $p->calculate(); $p->changeClass("pagination"); } include("templates/winners.html"); ?>

                            Will have to have another look later when I'm doing packing!
                            Kathy Newman

                            Comment


                              #15
                              Looking at the source of http://www.puddlepetcare.co.uk/acatalog/test_php.php shows that you still have 2 sets of html, head and body tags. Lines 16 to 623 contain an entire web page (starting with the opening HTML tag and ending with the closing HTML tag). I'd suggest getting this sorted before proceeding...

                              Comment

                              Working...
                              X