我基本上编码了一个代码,该代码填充了我的数据库中的类别列表,然后您就可以选择要删除的类别.
我有删除代码的问题,由于错误似乎无法正常工作:
Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in F:\xamppnew\htdocs\650032\admin\delete.php on line 6
Run Code Online (Sandbox Code Playgroud)
造成这种情况的一行是:
if(isset($_POST['delete_id'] && !empty($_POST['delete_id']))) {
Run Code Online (Sandbox Code Playgroud)
deletecategory.php
<h3>
Delete Category
</h3>
<?php $result = mysql_query("SELECT * FROM category"); ?>
<table>
<?php while($row = mysql_fetch_array($result)) : ?>
<tr id="<?php echo $row['category_id']; ?>">
<td><?php echo $row['category_Name']; ?></td>
<td>
<button class="del_btn" rel="<?php echo $row['id']; ?>">Delete</button>
</td>
</tr>
<?php endwhile; ?>
</table>
<script>
$(document).ready(function(){
$('.del_btn').click(function(){
var del_id = $(this).attr('rel');
$.post('delete.php', …
Run Code Online (Sandbox Code Playgroud) 我在从SF2.0.x迁移到SF2.7的应用程序中收到此错误:
[1] Symfony\Component\Debug\Exception\FatalErrorException: Compile Error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead)
at n/a
in /var/www/html/reptooln_admin/app/cache/dev/twig/68/7f/63589dd3687cb849dd68e6b6c10aa99eda1d82f95a5f3ac52a864d200499.php line 39
Run Code Online (Sandbox Code Playgroud)
我不知道什么是失败或如何解决这个问题所以我需要一些建议.这是报告Stacktrace的缓存文件中的行:
if ((((empty((isset($context["form_action"]) ? $context["form_action"] : $this->getContext($context, "form_action"))) == true) || (isnull((isset($context["form_action"]) ? $context["form_action"] : $this->getContext($context, "form_action"))) == true)) || (isset((isset($context["form_action"]) ? $context["form_action"] : $this->getContext($context, "form_action"))) == false))) {
echo " ";
$context["form_action"] = "";
echo " ";
Run Code Online (Sandbox Code Playgroud)
我有这个TwigExtension:
class PDOneTwigExtension extends \Twig_Extension
{
public function getFilters()
{
return array(
'var_dump' => new …
Run Code Online (Sandbox Code Playgroud)