1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Boston, MA
    Rep Power
    Ok.... im a total n00b at php... i get the gist of it etc. but can i use php to perform the same as generic ssi?
    (ie pulling the main content out of the actual page... and sticking in and include or however you'd do it in php)
    I assume this is true, I'm just looking to be re-affirmed on this fact
    anyone know of where i can find out *how* to do this?

  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Perth West Australia
    Rep Power
    <?php include('thisfile.php3/html/whatever');?>

    the include file can be text , a ripped page , pure script , html - whatever.

    You may need to check your permissions for including external files.

    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. No Profile Picture
    a total freak
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    use the include(); function or require(); function, the only difference among both is that with include(); you are able to call array's of files..

    PS: if you wanted to include, say file B.php3 in file A.php3, such as,
    (file A.php3):
    <?PHP include('B.php3'); ?>, to call back file A.php3 in file B.php3, u can use the $PHP_SELF variable to call the 'parent' file.. i guess you should know this..
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power
    From what I have read the differencd between require and include is that require executes any scipts in the required file whether it is called or not where include only ececutes the scripts in it's file if it is called. In the following example 1 only file a would run any script in it where as example 2 both file a and b would run any script in them. ie:
    //example 1
    $a = "1";
    if ($a == 1) {require (file a)}
    if ($a == 2) {include (file b)}

    //example 2
    $a = "2";
    if ($a == 1) {require (file a)}
    if ($a == 2) {include (file b)}

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. problems with php includes
    By boseph in forum PHP Development
    Replies: 9
    Last Post: January 23rd, 2004, 04:27 PM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo