Php Trouble -- include URL
Posted by: Crys
Posted on: 2003-05-09 21:23:00
I'm trying to basically write a php wrapper for a perl script so I can skin the results and include menus just like the rest of my site. I /am/ running php as cgi. Though I'm not sure the include is my only problem since the querystring it's complaining about is off as well.
URL: (note that you actually need to submit a search to get an error)
http://enlighteneddreams.fanworks.net/search.phtml
Error message:
Warning: Failed opening 'http://enlighteneddreams.fanworks.net/mt/mt_search.cgi?SearchCutoff=9999999' for inclusion (include_path='.:/usr/local/lib/php') in /home/.drizzle/crysc/ed.fanworks.net/search.phtml on line 51
Code:
<?php include ("/home/crysc/ed.fanworks.net/includes/header1.inc"); ?>Search<?php include ("/home/crysc/ed.fanworks.net/includes/header2.inc"); ?>
<h1>Search</h1>
<?php include ("/home/crysc/ed.fanworks.net/includes/header3.inc"); ?>
<form method="post" >
<input size="30" name="search" value="<?=$_POST['search']?>" />
<input type="submit" value="Search" /><br />
<input type="checkbox" name="CaseSearch" /> Match case
<input type="checkbox" name="RegexSearch" /> Regex search<br />
<b>Sort By:</b>
<select name="SearchSortBy">
<option value="created_on">Authored On Date</option>
<option value="title">Title</option>
</select><br />
<b>Sort Order:</b>
<select name="ResultDisplay">
<option value="ascend">Ascending</option>
<option value="descend">Descending</option>
</select><br />
<b>Search Where:</b>
<!-- <MTBlogs>
<input type="checkbox" name="IncludeBlogs" value="<$MTBlogID$>" checked="1" /> <$MTBlogName$>
</MTBlogs> -->
<br />
<b>Search entries from:</b>
<select name="SearchCutoff">
<option value="9999999">the beginning</option>
<option value="7">one week back</option>
<option value="14">two weeks back</option>
<option value="30">one month back</option>
<option value="60">two months back</option>
<option value="90">three months back</option>
<option value="365">one year back</option>
</select>
</form>
<?php
$postArr = $_POST;
foreach($postArr as $key => $item )
{
$output = array();
$output[] = $key . '=' . $item;
}
if (is_array($output))
{
$data = implode('&', $output);
$file = 'http://enlighteneddreams.fanworks.net/mt/mt_search.cgi?' . urlencode($data);
include($file);
}
?>
<div class="spacer">
</div>
<?php include ("/home/crysc/ed.fanworks.net/includes/footer.inc"); ?>
Edited by Crys on 05/09/03 09:27 PM (server time).