Forums

Give help. Get help.

  • # August 26, 2012 at 9:43 pm

    I get this text

    Not Found

    The requested URL /phpinfo.php was not found on this server.

    # August 26, 2012 at 9:43 pm

    Is that file located in htdocs?

    # August 26, 2012 at 9:46 pm

    The only thing I have located in my htdocs so far is index.php, stylesheet.css, header.php

    # August 26, 2012 at 9:46 pm

    Move phpinfo.php inside htdocs and see if that solves it

    # August 26, 2012 at 9:50 pm

    Do I have to create a phpinfo.php file or is there an already existing one that came with MAMP?

    # August 26, 2012 at 10:01 pm

    @hrechkaness Follow this tutorial and reload Mamp. Then take a screenshot of the error.

    # August 26, 2012 at 10:08 pm

    Will do, I’ll post back once I’ve finished the tutorial

    # August 27, 2012 at 9:49 pm

    Alright, I finished the tutorial but it turns out, that wasn’t the answer to my problem. It was directly related to my header code. If I had listened to your advice in the beginning and changed it to the doc type to html5, I’m sure I wouldn’t be having this problem. Here is the code I had to delete to make my page run smoothly.

    < ?xml version="1.0" encoding="UTF-8"?>

    Thanks for all your help. I’ll post back if I’m having any other issues but it looks like it should be smooth sailing from here. Cheers!

    # August 28, 2012 at 12:21 am

    The tutorial would have allowed us to see where the problem was, not immediately solve it. Glad it’s now working.

    # April 13, 2013 at 5:23 am

    How can I include header & footer if my content page is inside sub folder. Could you plz tell me what script i’ve to use if my pages inside folder / sub folder. so far i know and see here:
    < ?php include 'header.php'; ?>
    if my pages without folder.

    # April 13, 2013 at 5:55 am

    You can go inside subfolders with `include ‘subfolder/header.php’` or inside parent folder with `include ‘../header.php’`

    # July 9, 2013 at 11:41 am

    hrechkaness you’re the MAN. I have two more weeks before graduation in a Web MultiMedia Design class. I love it from UX to php. The instructors just touch on php the rest is on me.
    Just reading your post and comments have got me where I wanted to be with the include tag.
    Thanks

    # August 3, 2014 at 9:42 am

    PHP code< ?php include 'header.php'; ?>and < ?php include 'footer.php'; ?> in this post no longer works.

    Please update post to <?php include('header.php'); ?> and <?php include('footer.php'); ?>

    “Cheers”

    __
    # August 3, 2014 at 10:57 am

    PHP code < ?php include 'header.php'; ?> and < ?php include 'footer.php'; ?> in this post no longer works.

    What do you mean by this? What are you trying to do, and what is the problem you are encountering? Please describe what you are trying to do, what actually happens, and any error messages.

    Please update post to <?php include('header.php'); ?> and <?php include('footer.php'); ?>

    include (require, et.al.) are language constructs, not functions. Placing parenthesis around the filename is not necessary, and, in fact, can be misleading.

    The only thing wrong, syntax-wise, with your example above was the space between the < and ?php. I don’t know if that is an actual typo in your code, or just how you wrote it here.

    <?php include 'header.php'; ?>
    <!-- HTML content  -->
    <?php include 'footer.php'; ?>
    
    # October 30, 2015 at 2:52 pm

    If you call this piece of code in a HTML page that contains references to CSS and JS files, then I suppose you need to place all files in the same folder as header.PHP so that the server knows where to call the php scripts?

Viewing 15 posts - 16 through 30 (of 32 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag