我有一个代码,假设你运行一个字典搜索引擎,我刚刚开始并坚持下去。这是我的完整代码。
<html>
<head>
<title><center>Dictionary</center></title>
</head>
<body>
<br><br>
<center>
<form action="" method=get>
<input type=text name=query style="font:11px arial; font-weight:bold; background:#FFFFDD;">
<input type=submit name=submit >
</form>
<br>
<br>
<br>
<table width=400 align=center><tr><td>
<?php
$txt_file= file_get_contents('dcdocument.txt');// << i put a path over here
$rows= explode("\n", $txt_file);
foreach($rows as $row => $data)
{
//i have a long list of words and separated the words from definition using":::"
if ($row_data = ':::'){
explode(':::', $data);
};
$row_data = explode('::::', $data);
?>
</table>
<br> <br>
</center>
</form>
</body>
<html>
&#13;