/    Sign up×
Community /Pin to ProfileBookmark

Hello there,

I am writing a page (using javascript) to generating a new .html page (which is about:blank at the moment) and now I want to save that page as a certain file (say new.html) to a certain location in my hard drive (say C:temp). How can I do this? I never use PHP before and someone advise me to use PHP to achieve such task. Thanks a lot.

Sam

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@JonaMar 05.2004 — [font=arial]You could only do this if you had PHP installed on the C:TEMP folder of your hard drive, lol, which isn't possible. You'll have to save the output of the file on the local disk, that's all you could do.

Unless you had a server that supports PHP, in which case you can set up the JavaScript to generate an HTML file and then use PHP to create a .html file and send a request that will let you download it. But that requires a host that supports PHP (and a vistor that supports JavaScript).[/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@spykemitchellMar 06.2004 — Yeah Jona's right.

What you could do is set up a local server (abyss is a good one) and then install PHP into the server. Download php from:

[URL=http://www.php.com]PHP.com[/URL]

Then you can run the php scripts on this server.
×

Success!

Help @hellosamhi 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,
)...