Web Analytics Made Easy -
StatCounter Need Help Combining PHP Files - CodingForum

Announcement

Collapse
No announcement yet.

Need Help Combining PHP Files

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

  • Need Help Combining PHP Files

    When it comes to PHP, I am a complete beginner. I have three or so .php files as well as one javascript file that I need help combining so that it becomes a fully accesible webpage. Also I need to know how I can add html into it.

    Thanks...

  • #2
    show code
    or u mean like this?
    PHP Code:
    <html>
    <?php 

    function()
    //more code here

    ?>

    <script language="javascript/text">
    // some JS here
    </script>
    <?php 
    // more php here
    ?>
    <?
    // more php here
    ?>

    Comment


    • #3
      I used the code you gave me and added the .php files where you mentioned. When I previed it in the browser though, the coding was apparently wrong. Can someone please do it for me. I attached the .php files so you can combine it yourself. I think I'll be able to do the javascript one myself.
      Attached Files

      Comment


      • #4
        You can view HTML and Javascripting on your PC without being online.
        But you can't view PHP (or process PHP scripting) unless you have uploaded
        your .php files to a server (your webhost), and you are online.

        Comment


        • #5
          I just realized that free webhosters won't upload .php files. Is there a way to convert .php files into .html so I can make it show up in the browser like any other .html file? Sorry for all these questions...like I said, I'm a beginner.

          Comment


          • #6
            No matter what extension is on the file, the server your page is located on must have PHP installed and enabled. Otherwise, how will the PHP code get processed?

            To answer your question, yes there is a way to force PHP to process a file with an htm or html extension, but you need access to PHP config to get that working (which free hosts will never do for you).

            Comment

            Working...
            X