Here is my walkthrough on how to create your php include files and code them into your pages. All images were created by me (try not to be too awed by my paintshop skills ) So please do not redistribute, If you would like to link or feature on your site, please link my website. Enjoy!
Step One: Make Your Content Folder
Go to your website file manager. In the root folder, which is the folder where your "index/home" page is located, along with maybe an "images" folder and the like, you need to create a new folder. When it prompts you to name it, call it "content". click ok/save, and were done! Onto step 2...
Step Two: Create A New File
When inside your new "content" folder we are going to create a new file by clicking "new file"
Step Three: Copy or Create Your New File Text/Html
Now you need to copy (if you have existing code you'd like to use) by left clicking your mouse and dragging the highlighted area around the desired text. Once you've highlighted what you want, right click and select "copy", or press Ctrl+C
Step Four: Paste Your Text/Html Into Your New File
In the area where you can type text, right click your mouse and select "paste". Or press Ctrl+V. When your text/html is there, doublecheck it for any errors. Once everything looks good click save!
Step Five: Save Your File
Do you see your new file in the content folder? Success!
Step Six: Choose the File To Insert Your PHP Include Code Into
Choose Your desired file to put the PHP include code into. Click "edit" . This brings up the text editor where you will see your html code for that page. If this defaults to a WYSIWIG editor, choose to show it in "normaltextarea" or "html editor" , ect...
Step Seven: Insert The PHP Include on Your Page
Now that we see the html of our page, insert the code in the appropriate area. Depending on the codes and includes that come before and after the code we just put in, might effect where it shows up on the page. In this case, if the "sidebar" shows up on my page where its not supposed to be, try putting it somewhere else. Example: my "sidebar" comes after by "most recent blogs" php, so i could try putting sidebar first, and then blog posts.
Dont be intimidated. This is super easy, and if you follow the layout of the html code and put your includes where the original codes went you'll do just fine!
On a final note, you can see i still have some html between my phps. There really arent any rules for this. you can include html like div's, text, images, styles, formatting,ect...within your php includes, or just have text only, or a little of both! (i do). No rules here. Just whatever makes sense for you.
hello there
ink ablaze is my personal blog of adventures. and a haven for my art scans, resources, graphics, and tutorials for web design. enjoy!