if anybody knows how to add php file in joomla,how to redirect php pages in joomla.thanks in advance
You might want to be asking that question in a Joomla forum rather than here in the Moodle forums perhaps???
Go to http://forum.joomla.org/viewtopic.php?p=2395527 for that info. php is a code that can be added either directly with optional settings depending on which version of Joomla! you are using or by using an extension such as 'add php' http://extensions.joomla.org/extensions/edition/custom-code-in-content/60