PDA

View Full Version : PHP Embedding in HTML


Dr.MAD
11-25-2003, 03:26 AM
Besides of the search bar (which I'm still trying to fix yet) I'd like to add a counter on my webpage. I got an easy PHP counter for which I had to upload a counter.php file and a counter.txt file on my webserver.

They don't say WHERE on my webserver, but I guess it's simply in the main folder.
Then, they say that I have to include a line in my HTML file... a line reading

include("ezcounter.php");

But where do I insert that stuff? Do I have to do it like this?

<html>
<head>

<title>B-L-A-H</title>
</head>

<body >

WEBPAGE CONTENT
include("counter.php");


</body>
</html>

I'm sorry if this sounds a n00b question, but I don't know stuff about PHP (we'll probably only learn that next year at school :()
EDIT: forgot to add: they also tell me I have to CHMOD the text-file to 777 (all rights) I know what CHMOD is, but I have NO IDEA how to CHMOD a file in Windows

Any help will greatly be appreciated :D

eCK0
11-25-2003, 09:53 AM
Besides of the search bar (which I'm still trying to fix yet) I'd like to add a counter on my webpage. I got an easy PHP counter for which I had to upload a counter.php file and a counter.txt
EDIT: forgot to add: they also tell me I have to CHMOD the text-file to 777 (all rights) I know what CHMOD is, but I have NO IDEA how to CHMOD a file in Windows

Any help will greatly be appreciated :D
Maybe it's ment for a linux server? Not sure if it would do any good, but you could just right click the file and change it in the properties.

NorthViking
11-27-2003, 05:50 AM
You chmod the file in FTP. So first upload the file, then go to properties and chmod it.

PHP files should go in cgi-bin folder (if I'm right).
And make sure to upload PHP in ASCII format. Hope that helps :)

Pie
11-27-2003, 12:43 PM
First off, stop thinking linux and windows servers mean different code, they do not so stop it now.

second of all, do it like this....

<?php

include....

?>

<html>
...rest of code here...

Aman
11-27-2003, 04:32 PM
Um..

being a linux user you can CHMOD in FTP or in a console - But I've never heard of doing a root mod in Windows. I would like to insure NV is correct, all PHP files gon in the cgi-bin folder, bin-bash in some cases.