NameSilo

Call a .php page from a .html page

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
Thank you

Went with a different template
 
0
Close
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
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back