本文整理汇总了PHP中Recipe::SearchThing方法的典型用法代码示例。如果您正苦于以下问题:PHP Recipe::SearchThing方法的具体用法?PHP Recipe::SearchThing怎么用?PHP Recipe::SearchThing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Recipe
的用法示例。
在下文中一共展示了Recipe::SearchThing方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __autoload
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form method="post" >
<title>Schema Creator</title>
</head>
<?php
function __autoload($class_name)
{
include $class_name . '.php';
}
if (empty($_POST["RecipeName"]) && empty($_POST["Description"]) && empty($_POST["ImageName"]) && empty($_POST["URLName"])) {
echo 'Please Enter Recipe Name and Hit Search.';
} else {
$thing = new Recipe();
echo $thing->SearchThing("name", $_POST["RecipeName"]);
echo $thing->SearchCreativeWork();
echo $thing->SearchRecipeWork();
}
?>
<body>
<div style="border-style: outset; width: 450px" align="left">
<h2 style="color: red" align="center">Welcome to Recipe System</h2>
<table width="400" border="0">
<tr align="center">
<td align="right"><strong>Name :</strong></td>
<td align="left"><input id="recipeID" type="text" name="RecipeName" />
</td>
</tr>
<tr align="center">
示例2: __autoload
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form method="post" >
<title>Schema Creator</title>
</head>
<?php
$message = NULL;
function __autoload($class_name)
{
include $class_name . '.php';
}
if (empty($_POST["RecipeName"]) && empty($_POST["Description"]) && empty($_POST["ImageName"]) && empty($_POST["URLName"])) {
echo 'Please Enter Recipe Name and Hit Search.';
} else {
$thing = new Recipe();
$result = $thing->SearchThing("name", $_POST["RecipeName"]);
if ($result == 1) {
echo $thing->SearchCreativeWork();
echo $thing->SearchRecipeWork();
} else {
$message = "Recipe does not exist";
}
}
?>
<body>
<div style="border-style: outset; width: 450px" align="left">
<h2 style="color: red" align="center">Welcome to Recipe System</h2>
<h4 align="center"><label id=questionLabel ><? echo $message; ?></label></h4>
<table width="400" border="0">
<tr align="center">