Current location: Hot Scripts Forums » Programming Languages » PHP » Merge PHP files


Merge PHP files

Reply
  #1 (permalink)  
Old 05-10-07, 11:51 PM
eddyvlad eddyvlad is offline
Wannabe Coder
 
Join Date: Sep 2003
Location: In The Bloody Pits Of Hell
Posts: 160
Thanks: 2
Thanked 0 Times in 0 Posts
Merge PHP files

I am looking for a program that can merge 2 php files into 1.

Situation
I have to users.class.php. One for the front-end and one for the back-end. I've added more methods to both files and I found that it's troublesome. I want to merge the 2 files so that I just have to include to the same file and that'll save some space and troubles. I want the final file to have both methods and variables contains in both the (class) files.

Is there an easy way to do this?
__________________
Mr. Brown Eyes
Reply With Quote
  #2 (permalink)  
Old 05-11-07, 02:21 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
create a superclass which will contain those methods and fields, and extend the other 2 classes from it. That's the nicest OOP way.
To place both classes in 1 file, just copy/paste one in the other

cheers
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
create files in php banli PHP 3 10-31-08 09:49 PM
Uploading files into server using PHP and MySQL sccc2008 Script Requests 1 01-26-07 02:19 AM
php files with no extension? liljoeyjordison PHP 4 09-03-05 01:46 PM
PHP Runner , Preview PHP files ! moslehi@gmail.com General Advertisements 3 12-08-04 03:01 PM
Chmoding files with php... tsb PHP 5 02-11-04 05:35 PM


All times are GMT -5. The time now is 06:02 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.