Javascript - 在网站上创建文本文件 [英] Javascript - create text file on website

查看:78
本文介绍了Javascript - 在网站上创建文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个网页,并且我想在我的网站上的一个新目录中编程创建一个文本文件(可以说它有'hello,我是一个文本文件')。该程序将在网站的另一个目录中。



例如。
https://www.example.com/txtbuild.html 正在尝试programaticly make https://www.example.com/texts/hi.txt



有没有办法用HTML / Javascript做到这一点?



编辑:
我在Github

解决方案

你无法单独使用HTML / Javascript,你需要在后端有一个功能语言(nodejs,php ,python)


So I have a web page, and I would like to programaticly create a text file (lets say it has the words 'hello, I am a text file' in it) on a new directory on my website. The program will be in another directory on the website.

e.g. https://www.example.com/txtbuild.html is trying to programaticly make https://www.example.com/texts/hi.txt

Is there a way to do this with HTML/Javascript?

EDIT: I am on Github

解决方案

You can't do it with HTML/Javascript alone, you need a functional language on the backend (nodejs, php, python)

这篇关于Javascript - 在网站上创建文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆