我试图附加到“echo $tube->error;”的 CSS 没有显示..它只是显示为默认的黑色文本,就好像它没有css一样......我该如何解决这个问题?
谢谢 (:
以下是我需要修复的..
html/php 部分:
<div id="error">
<pre>
<?php } else {
echo $tube->error;
}
}
?>
</pre>
</div>
上下文中的 html/php 部分:
<?php
if(isset($_POST['url']))
{
include('curl.php');
include('youtube.php');
$tube = new youtube();
$links = $tube->get($_POST['url']);
if($links) { ?>
<div id="result">
<b>Download Links ( Same IP Downloading only )</b> :
<?php
$format = '<p><a href="%3$s">Download</a> video.%s - %s<br/>Right-click download link and choose etc...</p>';
while($link = array_shift($links))
{
echo vsprintf($format,$link);
}
?>
</div>
<div id="error">
<pre>
<?php } else {
echo $tube->error;
}
}
?>
</pre>
</div>
CSS:
#error {
width:404px;
margin-left: auto;
margin-right: auto;
font-size:12;
font-family: 'Dosis', sans-serif;
color:white;
padding-top:20px;
}
youtube.php的一部分(附加信息..不确定你们是否需要这个):
function get($url)
{
$this->conn = new Curl('youtube');
$html = $this->conn->get($url);
if(strstr($html,'verify-age-thumb'))
{
$this->error = "Adult Video Detected";
return false;
}
if(strstr($html,'das_captcha'))
{
$this->error = "Captcah Found please run on diffrent server";
return false;
}
if(!preg_match('/stream_map=(.[^&]*?)&/i',$html,$match))
{
$this->error = "Error Locating Downlod URL's";
return false;
}
再次感谢任何帮助!!