首页 \ 问答 \ 浏览器在嵌入时不显示图像(Browser not displaying images when embedded)

浏览器在嵌入时不显示图像(Browser not displaying images when embedded)

如果你去http://cartpauj.icomnow.com/,你会发现HTML中的图像没有显示出来。 这是一个截图: http//cl.ly/MrL6

图像的src是100%正确的,如果我直接浏览到浏览器中的图像文件,它就会显示出来。 Chrome中的Element Inspector屏幕截图: http//cl.ly/Mrlt

然而,当我直接浏览到那个图像时,它显示得很好。 我会发布图像的链接,但我不能,因为我这里没有10个声望点。 您可以在上面的屏幕截图中看到图片的网址。

我已经检查了.htaccess是否有任何奇怪的规则,但没有任何错误。 有没有人有任何想法会导致这种情况发生?


If you go to http://cartpauj.icomnow.com/ you'll see that the images in the HTML are not showing up. Here's a screenshot: http://cl.ly/MrL6

The src to the images is 100% correct and if I browse directly to the image file in my browser it shows up. Screenshot with Element Inspector in Chrome: http://cl.ly/Mrlt

Yet when I browse to that image directly it shows up fine. I would post a link to the image but I cannot because I don't have 10 reputation points here. You can see the URL to the image in the screenshot above.

I've checked .htaccess for any strange rules but nothing wrong in it. Does anyone have any ideas what could cause this to be happening?


原文:https://stackoverflow.com/questions/14846730
更新时间:2023-05-07 12:05

最满意答案

事实证明,默认情况下它重定向到_posix_getopt(),这导致了我上面描述的行为。

我最终发现的可能解决方案是:

  1. 改用getopt_long()。 这似乎没有相当于posix。
  2. 定义_GNU_SOURCE,它会停止重定向。
  3. 可能使用包装器外壳脚本手动重新排序参数。

It turns out that by default it was redirecting to _posix_getopt(), which was causing the behaviour I described above.

The possible solutions I found to this in the end:

  1. Use getopt_long() instead. This doesn't seem to have a posix equivalent.
  2. Define _GNU_SOURCE, which stops the redirection.
  3. Manually reorder the parameters, possibly using a wrapper shell script.

相关问答

更多
  • getopt()实现“标准”命令行结构,即所有选项都在所有参数( ref )之前。 并非所有的Unix命令都遵循这个“标准”; 如果你的命令需要偏离,你可以手动解析argv [],而不需要getopt()函数。 来自man 3 getopt: If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that ...
  • 事实证明,默认情况下它重定向到_posix_getopt(),这导致了我上面描述的行为。 我最终发现的可能解决方案是: 改用getopt_long()。 这似乎没有相当于posix。 定义_GNU_SOURCE,它会停止重定向。 可能使用包装器外壳脚本手动重新排序参数。 It turns out that by default it was redirecting to _posix_getopt(), which was causing the behaviour I described above. T ...
  • 有一个选项参数以破折号开头并且通常类似于另一个选项,这是完全可以的。 getopt没有理由报告错误。 如果程序不想接受这样的选项参数,它应该专门检查它们,例如 if (optarg[0] == '-') { // oops, looks like user forgot an argument err("Option requires an argument"); } It is perfectly OK to have an option argument that ...
  • 除非你打算让-1成为一个以0作为参数的选项,否则答案是你没有。 getopt仅用于处理符合标准POSIX实用程序选项语法的选项。 为此可以使用GNU getopt_long ,或者你可以编写自己的argv解析器(这很容易)。 编辑:其实我觉得我误读了你想要的东西。 如果你想-后跟任何数字被解释为具有该数值的选项,我认为没有任何版本的getopt可以工作。 你无法将每个数字作为一个选项进行特殊情况,如果你只是告诉getopt所有数字都是带参数的选项字符, -123将被解释为-1选项,参数为23 (其中很好,你 ...
  • 尝试getopt.getopt(sys.argv[1:], 'x:y:') http://docs.python.org/library/getopt.html 分析命令行选项和参数列表。 args是要解析的参数列表,没有对正在运行的程序的引用。 通常,这意味着sys.argv [1:]。 选项是脚本想要识别的选项字符串,其中需要参数后跟冒号(':';即与Unix getopt()使用的格式相同)的选项。 Try getopt.getopt(sys.argv[1:], 'x:y:') http://docs ...
  • POSIX标准getopt()不支持单个标志字母的多个参数。 有几个选项可供您使用。 一种选择是将名称指定为用于分隔选项字母的参数(或使用同一个字母两次): ./command -o key -v value ./command -o key -o value 另一种选择是使用POSIX标准的getsubopt()和一个命令行符号,例如: ./command -o key=value 如果一组键值相对较小(不太好,如果它们很大,但是您可以不使用getsubopt()那么只需为自己解析optarg即可。 ...
  • 在原始版本中,您的字符串包含--clicks 后跟一个标签,然后是select keywords with more than N clicks [required] 。 在修订版中,您的字符串有空格而不是制表符。 使用<<"EOPARAM"和“ \t ”代替<<'EOPARAM'和“ ”。 >type x.pl use Getopt::Declare; Getopt::Declare->new(<<'EOPARAM'); [strict] --client clie ...
  • find是一个混合选项和非选项参数的命令示例,并关注顺序。 find is an example of a command that mixes options and non-option arguments, and cares about the order.
  • 你会使用argparse(为什么选择optparse,为什么?): >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--foo', action='append') >>> parser.parse_args('--foo 1 --foo 2'.split()) Namespace(foo=['1', '2']) 从文档: https : //docs.python.org/3/library/argparse.html 例如 ...
  • 就getopt()而言,顺序无关紧要。 重要的是getopt()第三个参数(即:它的格式字符串)是正确的: 以下格式字符串都是等效的: "c:ba" "c:ab" "ac:b" "abc:" 在您的特定情况下,格式字符串只需要类似"abcd" ,并且正确填充switch()语句。 以下最小例子将有所帮助。 #include #include #include #include int main (int argc, ch ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)