Page 1 of 1

Index.html include php

Posted: Fri Mar 26, 2010 7:42 am
by toucan
Hi, have a simple index.htm and I want a link to execute a php script.

I think i need my html page something like this:

<html>
<body>

<h1>Welcome to my home page!</h1>
<p>Some text.</p>

<a href="/install.php">Install CMS</a>
</body>
</html>

and then my install.php page something like this:

<html>
<body>

<?php $foo = system('wget http://www.myserver.com/myfile.tar ~',$output);?>
<? system("tar -zxvf myfile.tar") ?>

</body>
</html>


Am I going about this the right way?

Re: Index.html include php

Posted: Fri Mar 26, 2010 8:06 am
by rahulsonar
yes, this is the correct way. User an href in index.html and then do whatever you want in php file...

Re: Index.html include php

Posted: Sun Mar 28, 2010 1:53 pm
by toucan
Wow, it worked! Of course, now I've got my files and untarred them, I want it to be executed. So, I put in an HREF linking to the newly created file, but what I'd really like it to do is load the new index.php itself, after the script has run.

How would I do this?