Norman Posted September 19, 2007 Share Posted September 19, 2007 Hi. I've a question. Can I use a .php page extension using HTML code? I mean.. I need .php extension becouse, maybe, I will include also PHP code.. but right now, I will put there only HTML code. Do you think is this possible? If yes, can I start like a normal HTML page( <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">etc. ), or have I to do something more? Link to comment Share on other sites More sharing options...
Kristian_C Posted September 19, 2007 Share Posted September 19, 2007 You can allways use .php if your server supports php files... And you dont need to have any php in it.. .. Dont know if it just was this you was asking about but.. yeah ...-Kristian_C. Link to comment Share on other sites More sharing options...
boen_robot Posted September 19, 2007 Share Posted September 19, 2007 Sure you can. But note that in this case, performance will be (very) slightly degraded, as PHP would try to parse those files even though they don't contain anything.If you decide to add some PHP at some point, just add it with <?php ?> as you'd do for any file. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 19, 2007 Share Posted September 19, 2007 Also, feel free to experiment yourself. It seems like some people on here ask certain questions asking if something is possible when they could have just tried it and found out for themselves. Experimentation is how you learn and become a better programmer. Make a file, call it .php, and see what happens. The PHP parser only looks for PHP tags, if it doesn't find any PHP tags in the file then the PHP engine will never execute anything. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.