Announcement

Collapse
No announcement yet.

PHP Scripts in Actinic?

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

    PHP Scripts in Actinic?

    I tried to include some PHP scripts in my actinic templates. However, it does not seem to work. My webserver is PHP enabled and i use many of my php scripts on that server.

    When you view the source code of the loaded page. The PHP code appears exactly how i wrote it, as if it wasnt even parsed by the server.

    E.g tested by typing
    <?php echo "Hello"; ?>

    Nothing is shown on actinic page (should print "Hello") not even the code its self. But it can be found in the source code...

    This has really got me stuck, anyone got any ideas?
    Cheers FrAz

    #2
    You need to make sure you page name ends with .php and not .html or else the server wont parse the page as php.

    Peter
    Printerbase - Colour & Mono Laser Printers

    Comment


      #3
      Sure?

      php can be included anywhere in a html file: eg

      <html>
      <head><title>Hello</title></head>
      <body>
      <?php echo "Hello World"; ?>
      </body>
      </html>

      Im not sure if you mean it must be a php file in general (in which case you are wrong) or wether the actinic file must be a php page.

      Is it possible to make all actinic pages php files? would i just need to change the file names?
      Cheers FrAz

      Comment


        #4
        Unless your server has been specifically setup to parse all files for php it will not parse pages with extensions ending in .htm or html.
        eg.
        index.html - will not be parsed for php code
        but index.php would be parsed for php code.

        You need to edit the section and change the page name, from something like "section1.html" to "section1.php".

        Peter
        Printerbase - Colour & Mono Laser Printers

        Comment


          #5


          Yer, thanks for your help, i changed all the files to .php files and the php now works. Its still rather strange, but hey!, it works now so im not complaining.
          Cheers FrAz

          Comment

          Working...
          X