Conflict using footer?

I created a html page
using
[php]

Welcome to my home page!

Some text.

Some more text.

<?php include 'http://nathankwebdesign.com/resume/footer.php';?> [/php] I create another page that goes like this. [php]<?php echo "

Copyright © 1999-" . date("Y") . " W3Schools.com

"; ?>[/php]

the footer does not show up.
This come from w3schools website
I am wondering if w3schools are using out of date php?

Thank you
Nathan

includes use an absolute or relative (from the current file) server path, not a url address.

It should probably be

[php]<?php include 'footer.php'; ?>[/php]

W3schools (aka W3fools) is somewhat known for questionable content quality. While they have gotten better there are definetely other resources that will help


Thanks

nope didn’t work.

You are saving the file with php as the extension and not html?

that what I was trying to do but now I m trying to find out
what I am doing wrong.

on why my php and html won’t work on the same page here.

http://www.phphelp.com/forum/general-php-help/interesting-php-and-html-won’t-work-on-same-page/

Please add this to the start of your (main) php file

[php]ini_set(“display_errors”, “1”);
error_reporting(E_ALL);[/php]

It should then display all errors instead of ignoring notices/warnings or going to a blank white page

Please add the folder structure where these files are (ie screenshot with tree view of folders and files, with extensions). Something fishy is going on here

I just misunderstood my homework assignment. I thought I had ot create a php outside of the html. but no, it can be in the inside.
I m going to go ahead and add that code
Thanks

Note that this code is for development only. On a production (live) site it should not be there, you should instead handle potential errors that might occur, log whatever you need to figure out what the problem was, and then show a “friendly” error message to the user.

I highly suggest you just start using a dedicated development virtual server. It’s just a couple of commands away (and it’s free)

You can then develop your sites and applications locally, and only upload them when you know stuff works. At the same time you can have whatever development debugging stuff enabled locally so you get proper error messages/etc when working on it.

For php to run on an html page it MUST have a php extension even if it contains HTML code. So it must be for example index.php NOT index.html.

why didn’t
w3schools website
say so in the 1st place?

getting more confused then ever…

Not usually defending w3schools too much, but to be fair “PHP intro”, “PHP install” and “PHP syntax” on there all said you should use PHP files.

What is a PHP File? PHP files can contain text, HTML, CSS, JavaScript, and PHP code PHP code are executed on the server, and the result is returned to the browser as plain HTML PHP files have extension ".php"
If your server has activated support for PHP you do not need to do anything.

Just create some .php files, place them in your web directory, and the server will automatically parse them for you.

You do not need to compile anything or install any extra tools.

The default file extension for PHP files is ".php".

A PHP file normally contains HTML tags, and some PHP scripting code.

http://nathankwebdesign.com/resume/helloworld.php

here is what I am suppose to do
Instructions: Incorporate PHP into your résumé website

How do you plan on incorporating it? To what extent? What did you learn from working in WordPress?

That i can earn a bit of money setting up website with Wordpress

FINALLY!! Got it

Let close this post

Sponsor our Newsletter | Privacy Policy | Terms of Service