0

I'm not sure if this question has been asked before, but I've been looking around the internet and I can't find an answer that works for me.

I see that some websites display the .php extension instead of .html or .htm. I want to know if there is any way for me to link an external php file in html, similar to the way you link another html page. Ex:

<body>
<a href="example.php">PHP page<a>
</body>

Of course, this doesn't actually work, or I wouldn't be asking. When I click the link it brings me to a page with the contents of the php file instead of actually running the script. Is this a problem with the html or the way that I set up the file?

LemmyX
  • 137
  • 15

1 Answers1

1

You can link the php page with your html page, you have to setup path correctly. Hope below example will solve your problem,

<a href="https://www.php.net/manual/en/tutorial.firstpage.php">Externallink</a>

Buddhika
  • 163
  • 1
  • 7