<?php
...
...
...
function poweredby () {
global $sph_messages;
print $sph_messages['Powered by'];?> <a href="http://www.sphider.eu/"><img src="sphider-logo.png" border="0" style="vertical-align: middle" alt="Sphider"></a> <?php
}
function saveToLog ($query, $elapsed, $results) {
global $mysql_table_prefix;
...
...
...
?>那个函数poweredby ()很奇怪,
括号里面既有?>,又有<?php
...
...
...
function poweredby () {
global $sph_messages;
print $sph_messages['Powered by'];?> <a href="http://www.sphider.eu/"><img src="sphider-logo.png" border="0" style="vertical-align: middle" alt="Sphider"></a> <?php
}
function saveToLog ($query, $elapsed, $results) {
global $mysql_table_prefix;
...
...
...
?>那个函数poweredby ()很奇怪,
括号里面既有?>,又有<?php
function test(){
echo "TEST=";
?>
test
<?php
}test();
?>打印:TEST=test 我觉得这种写法很难看
<?php
function test(){
echo "TEST="."test";//or echo "TEST=test";
}test();
?>
具体到你那个例子
print $sph_messages['Powered by']."<a href=\"http://www.sphider.eu/\">.....";
<?php
...
...
...
function poweredby () {
global $sph_messages;
print $sph_messages['Powered by'];?> <a href="http://www.sphider.eu/"><img src="sphider-logo.png" border="0" style="vertical-align: middle" alt="Sphider"></a><?php
}
function saveToLog ($query, $elapsed, $results) {
global $mysql_table_prefix;
...
...
...
?>