By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,892 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,892 IT Pros & Developers. It's quick & easy.

php and tempates for htm

nomad
Expert 100+
P: 664
Hello everyone:
I have a html template and I want to place a php file inside it.
The html template has images and links.
The php file is a simple one which opens a file listed below.

[PHP]<?php
$filename = "activite.txt";
$fp = fopen($filename, "r") or die("could not open $filename");
while (!feof($fp)) {
$line = fgets($fp, 1024);
echo "$line<br>";
}
?>[/PHP]

I have tried place the php inside the php file and open it on a browser but the images do not show up. Any ideals on how to solve this.
Does php except anything else other than a .txt file. Can i use .doc or any other extension?

Thanks
nomad

PS I think I figure it out. I need to send all the temp files to the test server. I hope this is right, if so or if not please still respond.
Aug 26 '08 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
Does php except anything else other than a .txt file. Can i use .doc or any other extension?
As far as I know there's no restriction what the extension can be, the question is, whether php (resp. your script) can handle the content (which is surely true for unformatted text (like txt, php, xml)). But I doubt that php can parse/understand (maybe there's a better word for that?) a doc file (except someone wrote an import function).
Aug 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.