NameSilo

Call a .php page from a .html page

SpaceshipSpaceship
Watch

T D S

Established Member
Impact
9
Hello

I have a custom made template which is done using html. I also have phpproxy which uses .php and I would like on my index.html page to call the index.php in the table created for text content. i have tried to use the include comand however it doesnt have any effect. any and all help appreciated. Thank you


This is The template
This is phproxy
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
Have you used the include command correctly?
Use the following command where you want the php page to be included in the html page.

<?php include("xxx.php"); ?>

where xxx is the filename of the php file.

You can also use the require command instead of the include command if required.

Moreover, if that does not solve out, rename the index.html as index.php and index.php as something else and then use the include command. It sounds indeed increidible but you are using index.html as well as index.php on the same root of the domain. You should not do so normally.
 
0
•••
Thank you

Went with a different template
 
0
•••
The solution to this is to tell the web server that index.html is to be phrased like a php file. Meaning you would have to add filetype to a .htacess file in the directory that index.html is located in. Then you could <?php include('blah.php'); ?> after that, because then the webserver will phrase the index.html file like it is called index.php. :D

.. going with a different template will do it too, i guess.
 
0
•••
Appraise.net
Spaceship
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back