Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Thanked 0 Times in 0 Posts

    html/php probably really simple

    I'm doing an assignment for a class where I need to link a php file to an html.
    Basically all I have to do is demonstrate a php function and write up a paragraph about it.
    Simple, except I have no idea what I'm doing when it comes to php.
    I decided to try to use this function:

    function jdmonthname2($julianday, $calendar, $abbrev = false) {
    if($calendar == CAL_GREGORIAN && $abbrev) $mode = 0;
    elseif($calendar == CAL_GREGORIAN && !$abbrev) $mode = 1;
    elseif($calendar == CAL_JULIAN && $abbrev) $mode = 2;
    elseif($calendar == CAL_JULIAN && !$abbrev) $mode = 3;
    elseif($calendar == CAL_JEWISH) $mode = 4;
    elseif($calendar == CAL_FRENCH) $mode = 5;
    else $mode = 10;

    return jdmonthname($julianday, $mode);

    but I'm not sure how to activate it/link it to the html or anything. In addition to that I can't even view it in the browser to check if it's working.

    If anyone can help I'd appreciate it!

  2. AdSlot6
  3. #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,103 Times in 1,075 Posts
    What kind of assignment is this where you are supposed to work with PHP when you don’t know anything about it?

    PHP is a server-side application, so you need a server in order to execute it and show the results in a browser, you can’t just open PHP files from the filesystem. And to display the result of a PHP operation you’d usually use echo().


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts