我正在尝试为我的YOURLS网站index.php添加这个ascii art徽标:
<pre style="font-family: 'Courier New', Courier, monospace"><?php echo
$asciiart; ?/></pre>
$asciiart = '
__/\\\\____________/\\\\__/\\\________/\\\_____/\\\\\\\\\_____/\\\________/\\\________/\\\\____________/\\\\__/\\\\\\\\\\\\\\\_\n
_\/\\\\\\________/\\\\\\_\/\\\_____/\\\//____/\\\\\\\\\\\\\__\///\\\____/\\\/________\/\\\\\\________/\\\\\\_\/\\\///////////__\n
_\/\\\//\\\____/\\\//\\\_\/\\\__/\\\//______/\\\/////////\\\___\///\\\/\\\/__________\/\\\//\\\____/\\\//\\\_\/\\\_____________\n
_\/\\\\///\\\/\\\/_\/\\\_\/\\\\\\//\\\_____\/\\\_______\/\\\_____\///\\\/____________\/\\\\///\\\/\\\/_\/\\\_\/\\\\\\\\\\\_____\n
_\/\\\__\///\\\/___\/\\\_\/\\\//_\//\\\____\/\\\\\\\\\\\\\\\_______\/\\\_____________\/\\\__\///\\\/___\/\\\_\/\\\///////______\n
_\/\\\____\///_____\/\\\_\/\\\____\//\\\___\/\\\/////////\\\_______\/\\\_____________\/\\\____\///_____\/\\\_\/\\\_____________\n
_\/\\\_____________\/\\\_\/\\\_____\//\\\__\/\\\_______\/\\\_______\/\\\_____________\/\\\_____________\/\\\_\/\\\_____________\n
_\/\\\_____________\/\\\_\/\\\______\//\\\_\/\\\_______\/\\\_______\/\\\________/\\\_\/\\\_____________\/\\\_\/\\\\\\\\\\\\\\\_\n
_\///______________\///__\///________\///__\///________\///________\///________\///__\///______________\///__\///////////////__\n'
asciiart;
但它打破了index.php!它只是让我看到一个空白的屏幕......我做错了什么?
在我尝试添加ascii文本徽标之前,这是我的index.php的工作源代码...
pastebin of working source code of my modified YOURLS website index.php
你正在逆转。首先分配$ asciiart变量,然后回显出来。
所以你的代码应该是:
<?php $asciiart = '......'; ?>
<pre style="font-family: 'Courier New', Courier, monospace"><?php echo
$asciiart; ?></pre>