手册上对于show_source的说法是This function is an alias for the function highlight_file() 对于highlight_file参数的说法是If the second parameter return is set to TRUE then highlight_file() will return the highlighted code as a string instead of printing it out. If the second parameter is not set to TRUE then highlight_file() will return TRUE on success, FALSE on failure. 后来我把代码改成了 $fd = fopen ($filename, "r"); $contents = nl2br(fread($fd, filesize ($filename))); highlight_string($contents); 还是不行,这到底是怎么回事啊 我用的是windows2000+php4.1.2+apache1.3.19,另外,被高亮的文件扩展名是php3。
对于highlight_file参数的说法是If the second parameter return is set to TRUE then highlight_file() will return the highlighted code as a string instead of printing it out. If the second parameter is not set to TRUE then highlight_file() will return TRUE on success, FALSE on failure.
后来我把代码改成了
$fd = fopen ($filename, "r");
$contents = nl2br(fread($fd, filesize ($filename)));
highlight_string($contents);
还是不行,这到底是怎么回事啊
我用的是windows2000+php4.1.2+apache1.3.19,另外,被高亮的文件扩展名是php3。