Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

PHP Includes for Web Content

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
10,293
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 9, 2007

Use PHP Includes to put consistent content on multiple web pages.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (rrphillips)

  • This is exactly what I was looking for! I still wonder if it's possible to include files via simple JavaScript, but I think I'm okay with this method as long as I don't mess up my .htaccess file.

    I do have one important question though: can you use any other extension than .inc? (like .html)

  • @Krazeel

    Although using a .inc extension is the most common, you can use any text-friendly extension including .html or .txt. I like the idea of using something other than html so that you can keep track of your independent web page files (html) vs your files that are part of a bigger page (inc).

Top Comments

  • great tutorial!

  • Very good information and the presentation was such that I could understand it and not be put to sleep.

    Steve Dougherty

see all

All Comments (32)

Sign In or Sign Up now to post a comment!
  • Subscribed, great videos! :)

  • @phgh1520 i think i love you!!!

  • you are so good teacher!

  • Seriously man, you have all the answers. Subscribed

    

  • I learned something very valuable today. Solid video, thanks for the good work.

  • great tutorial.. but if you have a web page with the include file in separate folders or directories, the navigation will get an error.. I'm not a php expert.. still looking for an answer..

  • @Krazeel .htm .xhtml .xhtm

  • MATE! If you see this and you can help please reply! I am trying to include something in a different directory... I am in c:\\xampp\htdocs\REG\reg.php and i am trying to include something in c:\\xampp\htdocs\config\config­.php

    Its telling me invalid stream although i wrote .. include("reg\config\config.php­") but it didnt help!! WHAT TO DO PLEASE ANYONE!

  • what can i say! Absolutely clear your explanation ;) Amazing, I loved the lesson. You even made a conclusion to summarize the main steps! 10/10! I agree with MCMdizajn. I didn't fall sleep this time! I feel i actually learnt! So now it's time to give it a try! :P wish me luck! :P Thank youuuuuuuuuuuuuuu!! :D

  • Thats help me a lottttttttttt.......thx dude

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more