php - 简单的php$message显示中心?

标签 php html

如何在我尝试过的页面中央显示我的图像

<center><?php
        }
        else
        {
            $form = true;
            $message = 'The username or password you entered are not good.';
        }
    }
    else
    {
        $form = true;
    }
    if($form)
    {
?></center>

但是没有成功..

最佳答案

试试这个:

<?php } else {
      $form = true;
      $message = '<div style="text-align: center;>The username or password you entered are not good.</div>';
     }
    } else {
        $form = true;
    }
    if($form)
    {
?>

但是,您应该在 CSS 文件中执行此操作。

关于php - 简单的php$message显示中心?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21812533/

相关文章:

jquery - 如何防止 anchor 滚动

php - 如何将导出的mysql数据库文件分块导入数据库?

php - WAMP 元素中未显示样式表

php - 按自定义列映射实体

php - 来自 pcntl_fork 的进程未终止

JavaScript 和 HTML - 如何将组合框的选定选项的值放入范围中?

html - 如何对齐这个 Bootstrap 单选按钮?

html - 计算网格容器范围之外的列大小

php - 如何找出是否在嵌套数组中

javascript - 使用图像制作图书阅读器 [jquery]