Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP Includes

Posted on 2009-04-08
3
Medium Priority
?
398 Views
Last Modified: 2013-12-13
I am just getting started creating an application using PHP/MySQL.  I have built a few before, but would like to streamline my workflow on this one using PHP Includes.  The page that will utilize the includes has <div> tags for CSS layouts, do i need to specify the width/height in the Include file or will it automatically adjust to the inherited file?
0
Comment
Question by:axessJosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
EMB01 earned 500 total points
ID: 24098896
It will auto-adjust based on that pages CSS.
0
 
LVL 20

Expert Comment

by:DVation191
ID: 24098931
When you include an external page for the purposes of importing content, it renders as if it was on the page already. In other words, if index.php has an include function for navigation.php, the CSS styles declared in index.php would be inherited by the contents of navigation.php, whether you declare width or height attributes or not.

// To include an external file in PHP
<?php include("navigation.php"); ?>

Open in new window

0
 
LVL 14

Expert Comment

by:EMB01
ID: 24098981
Exactly correct. When you use includes, just think of it as combining two pages codes into one code.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question