Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 打印以筛选网站。_Php_Html - Fatal编程技术网

Php 打印以筛选网站。

Php 打印以筛选网站。,php,html,Php,Html,我知道这是错误的,但我不知道怎么做。有人能告诉我有什么问题吗 print "<a href="https://www.google.com/chrome/browser/desktop/" target='_blank' class='gemma' style='position: fixed; bottom: 0; right: 0; text-align:right; width:100%; padding:20px;'>Works best in Chrome web brow

我知道这是错误的,但我不知道怎么做。有人能告诉我有什么问题吗

print "<a href="https://www.google.com/chrome/browser/desktop/" target='_blank' class='gemma' style='position: fixed; bottom: 0; right: 0; text-align:right; width:100%; padding:20px;'>Works best in Chrome web browser</a>";
print”“;

正确的方法是完全按照正常方式编写HTML,使用双引号,并将字符串用单引号括起来。您还应该使用
echo
,而不是
print

echo '<a href="https://www.google.com/chrome/browser/desktop/" target="_blank" class="gemma" style="position: fixed; bottom: 0; right: 0; text-align:right; width:100%; padding:20px;">Works best in Chrome web browser</a>';
echo';

使用iframe解决此问题您的问题是什么?有人能告诉我为什么这一行代码会出错吗?iframe是什么?打印“'target=''u blank'class='gemma'style='position:fixed;bottom:0;right:0;text align:right;width:100%;padding:20px;'>在Chrome web浏览器中效果最佳”;echo和print有什么区别?有一些细微的区别,其中echo略快于print()。您可以在这里找到更多信息:这有点像使用if-else语句或选择使用case语句?有点像,是的,尽管您通常使用
echo
将内容输出到浏览器/UI-打印很少使用,如上所述,主要用于评估函数/具有特定的返回值。在这段代码中,Print被大量使用,因此我将继续使用它。我认为现在没有必要改变它。