#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Indonesia
    Posts
    87
    Rep Power
    15
    Just a simply problem but I can't find the solution, so please help !!!

    I wanna make a script that will use a function from another script.
    example : I have 'two.php' that will use a function from 'one.php'

    I try this in two.php

    require('one.php');

    bla bla bla

    but all of the coding in one.php is included in two.php
    So, how if I just want one function from 'one.php' that is included in 'two.php' ??

    Please help !!

    Thanks in advance
    See ya !!


    ------------------
    CyberOsc
    sphmjf_oscario@gurlmail.com

    ** It's the world of Oscario **
  2. #2
  3. No Profile Picture
    Carpe Diem
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi

    You can't. Include/Require will put the content of the file that is included into the main file.

    The only way is to break up the functions into smaller files



    ------------------

    Regards
    Darren
    --
    http://www.php4hosting.com/ $
    http://www.php4hosting.co.uk/
    PHP/MySQL Enabled Hosting/Dedicated Servers

Similar Threads

  1. the linker, the include and interdependent classes
    By behco in forum C Programming
    Replies: 7
    Last Post: February 1st, 2004, 07:55 AM
  2. the linker, the include and interdependent classes
    By behco in forum C Programming
    Replies: 0
    Last Post: January 31st, 2004, 12:57 PM
  3. Your thoughts on include()
    By JessJenn in forum PHP Development
    Replies: 4
    Last Post: January 25th, 2004, 05:51 PM
  4. include path problems - after uploading to host
    By alaw in forum PHP Development
    Replies: 2
    Last Post: December 9th, 2003, 05:11 PM
  5. Replies: 6
    Last Post: October 3rd, 2003, 01:01 PM

IMN logo majestic logo threadwatch logo seochat tools logo