• 0

how do you embed a full php scrip into a html file


Question

4 answers to this question

Recommended Posts

  • 0

If I'm not mistaken (I probably am) you can't do that...it has to be a php file into another php? Kinda like shtml can only be embeded into an shtml file?

Link to comment
Share on other sites

  • 0

k so i relabel the file to a php.

a php is allowed to have html

for example if i were to create an index.php file

but put <?php require "index2.php" ?> in the location I want the real php script.

only now I am plagued with the following.... Warning: Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/fairwood/fairwoodfirs.org/phpclassifieds/index.php:13) in /hsphere/local/home/fairwood/fairwoodfirs.org/phpclassifieds/index2.php on line 2

which is even more bother some than to begin with. Now I know that means that it is sending header information before and I tried putting session_start() in the beginning of the index.php file but then i get a parse error probably due to the fact that html is quite different than php especially when it comes to colors atleast :crazy:

if anyone can help me with specific code examples on how to successfully combine the two than i will be very happy :yes:

Edited by Yvo
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.