/    Sign up×
Community /Pin to ProfileBookmark

Calling PHP script from a HTML file

hey,

How to call a PHP script from a HTML file.
php file : test2.php
HTML file: config.html.

Please give me an idea…

Thanks in advance geeks
Prabhakaran

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@pcthugOct 12.2006 — You can't. You will either need to change config.html to config.php and insert the following code in to call test2.php:
[code=php]<?php include 'tes2.php'; ?>[/code]
or setup your webserver to parse HTML as PHP. Apache/htaccess example:
AddType application/x-httpd-php .html
Copy linkTweet thisAlerts:
@neilemrichOct 12.2006 — You could try using ajax to load a separate php page into a div tag using the scripts from http://script.aculo.us/

Though this doesn't interact with the php page it simply displays the html the php generates in the div tag, but you can pass variables to the php page via get in the url.
×

Success!

Help @captain123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...