Hello friends, I have designed HTML website. I want to run an external PHP file from my HTML code. How can I achieve this? Can you suggest me that whether IIS server supports php files? Need a quick reply.. Thanks in advance...
I think there is way to do it, but something like this way <?php $myTemplate = file_get_contents("index.html"); preg_match_all("/<-- PHP -->(.*)<!-- PHP -->/iu", $myTemplate, $phpcodes); foreach($phpcodes as $code) { eval($code); }
I simply want create a visitor counter & so want to use php code in my html webpage... Can you show me the way how to do it?
Simple... just create <img src="view.php?name=image.gif"/> And code your php into view.php, also you can display the current stats in your image, or if you want it to remain anonymous, you can simply make the image as a spacer. Regards Sunny Gupta
<iframe src="http://www.example.com/example.php"></iframe> Code (markup): should do the trick if you are wanting to do what I think you are
I think want you want is an apache mod called mod_rewrite. This allows you to call .php files with dynamic URI's and spit them out as a "static HTML page". mod_rewrite will pick up the link somesite.com/blog/2011/03/07/BlogPost.html and know to convert it to somesite.com/blog.php?name=BlogPost or something like that. It's quiet powerful I would recommend it. But there is no way for HTML to call any other languages, HTML is nothing more then a series of tags that the browser parses through the decorate the page.
IIS server is not used for php and you can use xampp or lamp or wamp to run php files converting html files into php are simply change name of file as example.php