我想使用这里提到的这些技术将wiki语法更改为html。
http://www.ladyada.net/library/software/wiki.html
这是我的php页面的源代码,似乎工作正常。你可以尝试这样:
http://temelelektronik.net/wiki/show.php?id=test
<?
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__)).'/');
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/events.php');
require_once(DOKU_INC.'inc/pageutils.php');
require_once(DOKU_INC.'inc/html.php');
require_once(DOKU_INC.'inc/auth.php');
require_once(DOKU_INC.'inc/actions.php');
//import variables
$QUERY = trim($_REQUEST['id']);
$ID = getID();
$REV = $_REQUEST['rev'];
$HIGH = $_REQUEST['s'];
if(empty($HIGH)) $HIGH = getGoogleQuery();
//sanitize revision
$REV = preg_replace('/[^0-9]/','',$REV);
$html = p_wiki_xhtml($ID,$REV,true);
$html = addslashes($html);
$html = ereg_replace("\n", '\n'."\\\n", $html);
$html = str_replace("</a>", "</a> ", $html);
echo ('var zoomy = "'.$html.'";');
echo ("document.write(zoomy);");
$url = "http://www.temelelektronik.net/wiki/" . str_replace(':', '/', $_REQUEST['id']);
$footer = '<hr /><br /><em>This page was autogenerated from
<a href=\"'.$url.'\" target=\"_blank\">' . $url . '</a> <br />Please edit the wiki to contribute any updates or corrections.</em>';
$footer = '"' . $footer . '"';
echo ('document.write('. $footer . ')');
?>
但是当我将这个Javascript代码添加到空白的html页面时,我什么也看不见。这是HTML文件。
<html>
<head>
<script language="Javascript" src="/show.php?id=test"></script>
</head>
<body>
</body>
</html>
正如你所看到的那样,它什么都没有。
http://temelelektronik.net/wiki/test.html
我该如何解决这个问题?我们将非常感谢您提供的任何帮助。感谢..