Your statement of the problem / questions is not very clear and you haven't provided much information.
i just want to if how to put a template in php
What does "in php" mean? Are you trying to insert the template into something that already exists in PHP or are you trying to add PHP code to the template or what?
,i already have my template and when i used it, I inserted it outside
What does "inserted it outside" mean? Inserted how? Outside of what?
,local host "restricted access"
Impossible to know why this is happening or how it is connected to the previous points without more detail and probably some code.
I think he's using or talking a joomla template. since he said that
"i just want to if how to put a template in php,,i already have my template and when i used it, I inserted it outside..i named it index"
you are already working with the PHP therefore you should know what PHP is. according to thw WIKI
"PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications."
or in simple explanation is a server-scripting language use for dynamic web pages.
What would lead you to that conclusion? There are probably hundreds of PHP-based systems that use templates. In addition there are thousands of templates built using HTML, CSS, Flash and everything else you can possibly think of. Rather than second-guess exactly what the question really means, JorJah needs to clarify the question and provide more info.