Re: de-bug no input file specified
| From: | Philip Graham | Date: | Fri, 19 Dec 2008 23:22:57 +0000 |
| Subject: | Re: de-bug no input file specified | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284865@lists.php.net to get a copy of this message | ||
> > Hi Philip,
> >
> > Here is my code ...
> >
> > <?php
> > if (!function_exists("GetSQLValueString")) {
> > function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
> > $theNotDefinedValue = "")
> > {
> > $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) :
> > $theValue;
> >
> > $theValue = function_exists("mysql_real_escape_string") ?
> > mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
> >
> > switch ($theType) {
> > case "text":
> > $theValue = ($theValue != "") ? "'" . $theValue .
> > "'" : "NULL";
> > break;
> > case "long":
> > case "int":
> > $theValue = ($theValue != "") ? intval($theValue) : "NULL";
> > break;
> > case "double":
> > $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
> > "'" :
> > "NULL";
> > break;
> > case "date":
> > $theValue = ($theValue != "") ? "'" . $theValue .
> > "'" : "NULL";
> > break;
> > case "defined":
> > $theValue = ($theValue != "") ? $theDefinedValue :
> > $theNotDefinedValue; break;
> > }
> > return $theValue;
> > }
> > }
> >
> > $colname_rsSearch = "-1";
> > if (isset($_GET['product_name'])) {
> > $colname_rsSearch = $_GET['product_name'];
> > }
> > mysql_select_db($database_MyDatabase, $MyDatabase);
> > $query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE
> > %s", GetSQLValueString("%" . $colname_rsSearch . "%",
> > "text"));
> > $rsSearch = mysql_query($query_rsSearch, $MyDatabase) or
> > die(mysql_error()); $row_rsSearch = mysql_fetch_assoc($rsSearch);
> > $totalRows_rsSearch = mysql_num_rows($rsSearch);
> > ?>
> >
> > - Gary
It doesn't look like your code is the problem, how is the file being executed.
Through the command line or IIS? In either case it sounds like either you
have don't have permissions on the file, you're pointing at the wrong file or
you've got a bad config setting somewhere. You can always try searching 'php
no input file specified' and see if others before you have had the same
problem for a quick fix. Other than that I'm sorry I can't be of more help
but unfortunately I'm not at all familiar with PHP on windows/IIS.
--
Philip Graham