I need to insert a php file into an HTML webpage$

Discussion in 'PHP' started by rhoniedotcom, Nov 14, 2010.

  1. #1
    I have a calendar with another program, that I want to link to an HTML/css page.
    I need to use the calendar with both the html page and the php page, because the links use php to link it back to the program. Does anyone know the script to do this with?
    The file name of the calendar is: calendar.cls.php. I have tried the include php command and it does not work. If I install the whole code for the calendar file, that it will not change the year, month and day. Both the calendar file and html file are written with css. The css for the calendar file is cal.css. This has got to be simple, but it is driving me crazy. Any suggestion or help would be great, and I would be happy to pay.
     
    rhoniedotcom, Nov 14, 2010 IP
  2. CreativeArmory

    CreativeArmory Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You will need to rename the main file with a file extension of .php not .html

    OR

    You can modify your .htaccess to run php with a .html

    AddType application/x-httpd-php .html
     
    CreativeArmory, Nov 14, 2010 IP
  3. dixcoder

    dixcoder Member

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    26
    #3
    I assume the path you have given is not correct in the include please make sure paths are correct
     
    dixcoder, Nov 14, 2010 IP
  4. vaidikkp

    vaidikkp Peon

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    a php file cannot be inserted into an HTML file but an HTML file can be converted into a PHP file by just renaming the extension from .html to .php. Convert your file into PHP and then include the PHP file you wanted to include in your HTML page
     
    vaidikkp, Nov 14, 2010 IP