当前位置: 首页>>代码示例>>PHP>>正文


PHP Recipe::UpdateThing方法代码示例

本文整理汇总了PHP中Recipe::UpdateThing方法的典型用法代码示例。如果您正苦于以下问题:PHP Recipe::UpdateThing方法的具体用法?PHP Recipe::UpdateThing怎么用?PHP Recipe::UpdateThing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Recipe的用法示例。


在下文中一共展示了Recipe::UpdateThing方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Recipe

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form action="UpdateRecipe.php" method="post" />
<title>Schema Creator</title>
</head>
<?php

    function __autoload($class_name) {
        include $class_name . '.php';
    }

    if (empty($_POST["name"]) && empty($_POST["description"]) && empty($_POST["image"]) && empty($_POST["url"])) {
        echo 'Please Enter Recipe Information.';
    } else {
        $thing = new Recipe('', '', ''); //As Thing, the super parent class extends Tag. Tag construtor is invoked.
        echo $thing->UpdateThing("name", $_POST["name"]);
//echo $thing->UpdateCreativeWork();
//echo $thing->UpdateRecipe();
        echo 'Recipe Updated Successfully.';
    }
    ?>
<body>
<div style="border-style:outset; width: 450px" align="left">
<h2 align="center" style="color:red">Update Recipe</h2>
<h5 style="color: red"><h5>
<?php
                    $recipe = new Recipe();
                    $form = new FormGenerator();
                    $form->generate($recipe);
                    ?>
<input type="submit" name="Check" title="Check" value="Update Recipe" >
开发者ID:nmp36,项目名称:FinalRecipe,代码行数:31,代码来源:UpdateRecipe.php

示例2: __autoload

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form action="UpdateRecipe.php" 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 Information.';
} else {
    $thing = new Recipe('', '', '');
    //As Thing, the super parent class extends Tag. Tag construtor is invoked.
    echo $thing->UpdateThing("name", $_POST["RecipeName"]);
    //echo $thing->UpdateCreativeWork();
    //echo $thing->UpdateRecipe();
    echo 'Recipe Updated Successfully.';
}
?>
<body>
<div style="border-style:outset; width: 450px" align="left">
<h2 align="center" style="color:red">Update Recipe</h2>
<h5 style="color: red"><h5>
<table width="400" border="0">
<tr >
<td align="right"><strong>Name :</strong></td>
<td align="left"><input id="recipeID" type="text" name="RecipeName" /></td>
</tr>
<tr align="center">
开发者ID:nmp36,项目名称:FinalRecipeProject,代码行数:31,代码来源:UpdateRecipe.php

示例3: __autoload

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Schema Creator</title>
</head>
<?php 
function __autoload($class_name)
{
    include $class_name . '.php';
}
echo 'Welcome';
$thing = new Recipe('', '', '');
//As Thing, the super parent class extends Tag. Tag construtor is invoked.
/* Update the existing recipe record Coffee */
$newdata = array('$set' => array("name" => "Instant-Coffee"));
echo $thing->UpdateThing(array("name" => "Coffee"), $newdata);
//echo $thing->UpdateCreativeWork(array("name" => "Coffee"), $newdata);
//echo $thing->UpdateRecipe(array("name" => "Coffee"), $newdata);
?>

</body>
</form>
</html>
开发者ID:nmp36,项目名称:FinalRecipeProject,代码行数:24,代码来源:Update.php


注:本文中的Recipe::UpdateThing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。