Calling .php file in Wordpress page

Discussion in 'PHP' started by d0cpaul, May 6, 2010.

  1. #1
    I have a .php file that I need to be on a Wordpress page. (it's a calculator if your wondering) I'm not exactly sure how I can call this .php file to the page so it works. Any ideas?
     
    d0cpaul, May 6, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You should be able to just include it in the template. Have you tried?

    Generally, though, I would recommend you code it into a plugin
     
    sarahk, May 6, 2010 IP
  3. Stealth777

    Stealth777 Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you really just want to call it into a page just use something like:

    <?php include("./myfile.php"); ?>
    Code (markup):
    to include it in the page.
     
    Stealth777, May 6, 2010 IP
  4. d0cpaul

    d0cpaul Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    I already tried that but I figured it out. Instead of placing the php file in a page I made the file it's own page.

    I uploaded the .php file to the root folder of my site on the server, typed in the location of the file in the address bar and it worked.:cool:
     
    d0cpaul, May 6, 2010 IP
  5. Stealth777

    Stealth777 Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Nice, glad to hear you got it working. :)
     
    Stealth777, May 6, 2010 IP