Beginner: Where to find php files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
millo_2k
Forum Newbie
Posts: 4
Joined: Tue Sep 28, 2010 10:20 am

Beginner: Where to find php files

Post by millo_2k »

Hi there,

very basic question - but im literally a day into learning php! If I have a website (a joomla installation) which I need to modify some php of a module, how do I go about locating the file I would need to change (ie. firefox's firebug can locate the css needed to change style). How on earth do you find the file needed for any given bit of code being called.

Thanks everyone
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Beginner: Where to find php files

Post by social_experiment »

Modules for joomla are stored inside yoursite/modules/
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
millo_2k
Forum Newbie
Posts: 4
Joined: Tue Sep 28, 2010 10:20 am

Re: Beginner: Where to find php files

Post by millo_2k »

Thanks for getting back to me, I know some of the basic stuff, unfortunately a client has brought me in halfway on a website, which has an ecommerce component template with modules within that (hikashop) - and trying to track down where things are kept seems impossible. Is there no way to find what files are producing certain code within it?

Thanks
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Beginner: Where to find php files

Post by social_experiment »

millo_2k wrote: Is there no way to find what files are producing certain code within it?
There's always a way but it involves you accessing the files in a editor (Notepad++ , or something similar) and looking at the source code.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Beginner: Where to find php files

Post by John Cartwright »

Yea.. the relevant code can be anywhere. A good system will logically organize your code so that it will be easy to find. For instance, in MVC we have module/controller/action schema. Module/controller/action are generally a 1-1 match with the url. So to find the code http://foorbar.com/mymodule/mycontroller/myacton we would look at our application folder under something like

/modules/mymodule/controllers/MyController.php, and the actions are methods in the controller.

Very quick to narrow down relevant code.
Post Reply