首页 \ 问答 \ VS 2017 .NET 4.6.2新的ASP.NET核心Web应用程序(.NET Framework)默认为x86平台(VS 2017 .NET 4.6.2 new ASP.NET Core Web Application (.NET Framework) defaults to x86 platform)

VS 2017 .NET 4.6.2新的ASP.NET核心Web应用程序(.NET Framework)默认为x86平台(VS 2017 .NET 4.6.2 new ASP.NET Core Web Application (.NET Framework) defaults to x86 platform)

为什么?

Web应用程序(.NET Framework)和Core Web应用程序(.NET Core)都是针对AnyCPU平台的。

这是一个错误还是有一些价值吗?

我使用的是Windows 10 x64并安装了2017年4月18日的VS 2017更新。

Microsoft Visual Studio Enterprise 2017版本15.1(26403.7)发布VisualStudio.15.Release / 15.1.0 + 26403.7 Microsoft .NET Framework版本4.6.01586


Why?

Web Application (.NET Framework) and Core Web Application (.NET Core) both target AnyCPU platform.

Is this a bug or is there some value in doing this?

I'm on Windows 10 x64 and have installed the 4/18/2017 VS 2017 update.

Microsoft Visual Studio Enterprise 2017 Version 15.1 (26403.7) Release VisualStudio.15.Release/15.1.0+26403.7 Microsoft .NET Framework Version 4.6.01586


原文:https://stackoverflow.com/questions/43610068
更新时间:2022-03-08 18:03

最满意答案

只需要$newurl = str_replace("_sport.html", "_football.html", $url);
这比执行preg_replace()更准确。

请参阅str_replace上的手册


Simply do $newurl = str_replace("_sport.html", "_football.html", $url);
This is faster than doing a preg_replace() and more accurant.

see the manual on str_replace.

相关问答

更多
  • 我在社区维基中复制/粘贴了OP答案,因为它附加在问题上。 我将my_file.php文件拆分为某个部分,然后再次重新加入 header.php文件
    foo.php bar.php footer.php
  • 你的正则表达式或替换字符串都没有意义。 正则表达式匹配不在 [az]范围内的所有内容(由前导^表示),并且替换字符串似乎包含正则表达式语法,它不应该包含正则表达式语法。 如果你试图替换单词,你的正则表达式应该看起来像/[az]+/i ,它对一个或多个字母进行不区分大小写的贪婪匹配。 要在替换中使用匹配的字符串,可以使用\N ,其中N是表示要引用的子匹配的数字。 要添加子匹配,请在您要引用的正则表达式的部分周围放置括号。 正则表达式变为/([az]+)/i 。 把它们放在一起,你得到以下,这似乎给你正在寻找的 ...
  • 完全相同的方式: $msg = preg_replace('/(:\)|=\)|:-\)|\(:)/i', "", $msg); Exactly the same way: $msg = preg_replace('/(:\)|=\)|:-\)|\(:)/i', "", $msg);
  • 您可以使用preg_replace_callback并让回调包含您要包含的文件并返回输出。 或者你可以用文本包含替换占位符,将其保存为文件并包含该文件(编译事物) Ty all for some lovely input. I will try and anwser my own question as clear as I can. problem: I first thought that I wanted to implement a php-function or include inside a ...
  • 好吧,奇怪的是。 您的代码对我来说非常好(请参阅下面我用于本地测试的代码)。 但是我用你的正则表达式修复了两件事: 不要使用| 作为一个分隔符,它在正则表达式中有意义。 你的正则表达式只是给人一种错觉,即你没有逃脱它. 秒。 它实际上也匹配http://www#mysite%com/script*php?fruit=apple 。 测试脚本: $fruitArray = array('apple' => 'green'); $_GET = array('size' => 'small'); $result ...
  • 我举一个例子,但它会工作,如果你有像' & '那样的后者' & '那么希望这会对你有用: $str = 'India & Aust & New '; $regex = '/(\s\&\s)/i'; $replace = ' & '; if(preg_match($regex, $str)){ $new_str = preg_replace($regex, $replace, $str ); echo '
    ';
        echo htmlspecialchars($  ...
                                        
  • 你可能在$strWord转义的元字符。 尝试这个... $strSubject= preg_replace('/\b'.preg_quote($strWord, '/').'\b/i', ''.$strWord.'', $strSubject); 另外,你可以使用这个:) $strSubject = preg_replace('/\b('.preg_quote($strWord, '/').')\b/i', '$1', $strSubject); You pr ...
  • 首先搜索lang_2以获取您想要的元素: foreach ($array['lang_2'] as $el) { if ($el['status_answer'] == 2) { $replacement = $el; break; } } 然后在lang_1中搜索要替换的元素: foreach ($array['lang_1'] as &$el) { if ($el['status_answer'] == 2) { $el = $r ...
  • 只需要$newurl = str_replace("_sport.html", "_football.html", $url); 这比执行preg_replace()更准确。 请参阅str_replace上的手册 。 Simply do $newurl = str_replace("_sport.html", "_football.html", $url); This is faster than doing a preg_replace() and more accurant. see the manua ...
  • str_replace()能够接受一个数组作为前两个参数,例如(来自Docs): search 正在搜索的值,也称为针。 阵列可用于指定多个针 。 您可以使用: echo str_replace( array('/en', '/fr'), '', $url ); 小提琴演示 str_replace() is able to accept an array as the first two arguments, for example (from the Docs): search The value be ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。