首页 \ 问答 \ react-native init指定反应版本和反应原生版本(react-native init specify react version and react-native version)

react-native init指定反应版本和反应原生版本(react-native init specify react version and react-native version)

我基本上想要通过react@15.6.0和react-native@0.45.0来启动一个react-native项目,因为依赖问题。 然而react-native命令只允许我指定react-native版本:

react-native init sample --version react-native@0.45.0

这个命令不起作用:

react-native init diskful --version react-native@0.45.0 --version react@15.6.0

这个也是:

react-native init diskful --version react-native@0.45.0 react@15.6.0

而且这也是:

react-native init diskful --version react@15.6.0 react-native@0.45.0

全局安装react@15.6.0或react-native@0.45.0不会影响。 请有人帮助我!


I basically want to init a react-native project with react@15.6.0 and react-native@0.45.0 because dependency problems. However react-native command only allows me to specify react-native version:

react-native init sample --version react-native@0.45.0

This command not works:

react-native init diskful --version react-native@0.45.0 --version react@15.6.0

This, too:

react-native init diskful --version react-native@0.45.0 react@15.6.0

And this, too:

react-native init diskful --version react@15.6.0 react-native@0.45.0

Install globally react@15.6.0 or react-native@0.45.0 does not affect. Please, someone help me!


原文:https://stackoverflow.com/questions/44966985
更新时间:2023-11-11 09:11

最满意答案

好像你的新网站没有.php文件处理程序。

因此,当Web服务器遇到这样的文件时,它将其呈现为下载而不是通过php运行它。

检查您的配置。


Seems like you do no have a .php file handler for your new site.

As such when such a file is encountered by the web server, it presents it as a download rather than running it through php.

Check your configuration.

相关问答

更多
  • 您可以强制下载,但必须从服务器端执行:实现您自己的端点(例如,一个servlet),它返回此标头以及请求的文件: content-disposition: attachment; filename="suggested-filename" http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html I have uploaded the image that contain the struts configuration file.
  • 你不能用HTML这样做。 这是一个基于服务器的解决方案。 您必须流式传输文件,以便浏览器触发保存对话框。 我建议不要这样做 用户如何与PDF进行交互应留给用户。 更新(2014): 所以...这个答案还是得到了大量的降价。 我认为这是4年前的回答,Sarim指出,现在有了HTML 5的download属性可以解决这个问题。 我同意,并认为Sarim的答案是好的(如果OP已经返回,它可能应该是选择的答案)。 然而,这个答案仍然是可靠的处理方式(正如伊涅特·伊恩的回答所指出的那样,而且奇怪的是,人们都同意这一点 ...
  • 好像你的新网站没有.php文件处理程序。 因此,当Web服务器遇到这样的文件时,它将其呈现为下载而不是通过php运行它。 检查您的配置。 Seems like you do no have a .php file handler for your new site. As such when such a file is encountered by the web server, it presents it as a download rather than running it through php ...
  • 这篇出色的全面文章 (“几乎完全控制弹出窗口”)应该回答关于JavaScript弹出窗口的所有问题。 “JavaScript 1.1还引入了窗口关闭的属性,使用这个属性可以检测一个窗口是否已经打开并关闭,我们可以使用它来将页面直接加载到开启者窗口中,如果它仍然打开以启用JavaScript 1.1浏览器:”