/    Sign up×
Community /Pin to ProfileBookmark

How to make this php file work??

I must be a total moron when it comes to php because I am sure this is very simple but I am making it quite difficult. I downloaded a simple date and time php file to try to understand how its working, the problem is I can’t figure out what goes where. Here is what the program tells ya to do…
1: Usage
a: Use the code below to show the date on your page. (For files with .php extensions)
<?php include “onlydate.php” ?>
b: To use it in a HTML Page use iframes
<iframe src=onlydate.php width=200 height=60 frameborder=0 scrolling=no></iframe>

2: Credits
Coded by Orkun Kaya.

3: Downloaded
This file was downloaded from [url]www.onlyphp.com[/url] .
[url]www.onlyphp.com/main/onlydate.php[/url]

Now I did two things, I opened up a blank html file and inserted the following into the “head” part iof the html… <iframe src=onlydate.php width=200 height=60 frameborder=0 scrolling=no></iframe>
I then saved the file as test.html
The file came with a php file and I uploaded that to my web shell in the CGI bin because my web site says I have to do that with active pages. So now I have a php file and the test.html file in the same cgi bin folder. When I open the html file it keeps asking me if I want to download the file…. I moved the Html file to another folder in my web shell outside of the cgi-bin but kept the php file there. Now when I open the html file it says file not found… Am I missing something really simple here?

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@JonaNov 18.2003 — [font=arial]Put the IFrame code in the BODY of the HTML document, not the head.[/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@Code_OneNov 18.2003 — and it asked me to download the file too...I did pretty much what he did...put the php file in my cgi-bin and put a html file with the iframe code in the body of the doc, in my root dir. And nothing. What's going on here, anyone?

CO
Copy linkTweet thisAlerts:
@JonaNov 18.2003 — [font=arial]If your document ends in a .php extension, you don't need the IFrame:[/font]

[code=php]
<?php
include("onlydate.php");
?>
[/code]


[b][J]ona[/b]
×

Success!

Help @SA_Heat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...