首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PhantomJs渲染

PhantomJs渲染
EN

Stack Overflow用户
提问于 2017-09-11 19:59:59
回答 1查看 55关注 0票数 0

从phantomJs渲染的文件名的字符数有没有限制?

代码语言:javascript
复制
var page = require('webpage').create();
page.open('http://github.com/', function() {
      window.setTimeout(function(){
      var filename = encodeURI('The code shown here is also available in various examples included with PhantomJS. You are also recommended to explore the use of PhantomJS for page automation, network monitoring, screen capture, and headless testing The code shown here is also available in various examples included with PhantomJS. You are also recommended to explore the use of PhantomJS for page automation, network monitoring, screen capture, and headless testing');
      console.log('filename: ' + filename);
      page.render(filename + ".png");
      phantom.exit();}, 100);
});

此文件不是通过phantomJs呈现的。

有人能帮帮忙吗?

EN

回答 1

Stack Overflow用户

发布于 2017-12-05 22:33:40

我不认为这与PhantomJS有任何关系,但基本上是与你的操作系统有关。在每个操作系统中,文件路径名都有大小限制。

根据naming convention in Windos OS的说法-

在Windows API中(以下段落讨论的一些例外情况除外),路径的最大长度为MAX_PATH,定义为260个字符。本地路径按以下顺序构成:驱动器号、冒号、反斜杠、由反斜杠分隔的名称组件和终止空字符。例如,驱动器D上的最大路径是“D:\某个256个字符的路径字符串”,其中"“表示当前系统代码页的不可见的终止空字符。(这里使用的字符<>是为了清晰起见,不能是有效路径字符串的一部分。)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46155260

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档