构建一个简单的CMS来管理mysql?

发布于 2024-11-26 18:47:56 字数 166 浏览 1 评论 0原文

我想构建一个简单的 CMS 系统,该系统将直接连接到我的远程数据库(mysql)并能够添加、删除/更新字段/记录。

有这方面的例子、教程吗?我应该从哪里开始?

我假设语言是 php? (是否有任何免费脚本可以执行此操作?)。无论如何,我想建立自己的。

I want to build a simple CMS system that would be directly connected to my remote database (mysql) and be able to add,delete/update fields/records.

Are there any examples of this, tutorials? where should I start?

I'm assuming the language would be php? (Are there any free scripts that does this already?). I would like to build my own regardless.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

冷情妓 2024-12-03 18:47:56

使用 adminerphpMyAdmin

您不需要自己制作。它们都是开源的,因此您可以浏览它并浏览代码

简单的示例代码(显示表格并允许删除表格)

<?php
if ($_GET['del']){
    mysql_query("DROP TABLE ".$_GET['del']);
    echo "done";
}

if ($_POST['password']){
    $con = mysql_connect('localhost', $_POST['username'], $_POST['password']) or die("Wrong details");
    mysql_select_db($_POST['db']) or die("Wrong database");
}


if ($con){
    $result = mysql_query("SHOW TABLES");
    while($row = mysql_fetch_row($result)){
        echo "<br/>Table ".$row[0]." (<a href='?del=".$row[0]."'>Delete</a>)";
    }
    die();
}
?>

<form method="post" action="">
Username: <input name="username" /><br />
Password: <input name="password" /><Br />
Database: <input name="db" /><br />
<input type="submit" />
</form>

Use adminer or phpMyAdmin

You don't need to make your own. They are both opensource so you can go through it and browser around code

Easy example code (show tables & allow to delete tables)

<?php
if ($_GET['del']){
    mysql_query("DROP TABLE ".$_GET['del']);
    echo "done";
}

if ($_POST['password']){
    $con = mysql_connect('localhost', $_POST['username'], $_POST['password']) or die("Wrong details");
    mysql_select_db($_POST['db']) or die("Wrong database");
}


if ($con){
    $result = mysql_query("SHOW TABLES");
    while($row = mysql_fetch_row($result)){
        echo "<br/>Table ".$row[0]." (<a href='?del=".$row[0]."'>Delete</a>)";
    }
    die();
}
?>

<form method="post" action="">
Username: <input name="username" /><br />
Password: <input name="password" /><Br />
Database: <input name="db" /><br />
<input type="submit" />
</form>
忆伤 2024-12-03 18:47:56

您需要确保阅读有关 MySQL 注入的内容,以确保不良访问者无法将恶意查询注入您的数据库。

我会推荐 PHP,因为我发现它与 MySQL 齐头并进,

请看一下这个以帮助您入门:http:// phpminiadmin.sourceforge.net/

You need to make sure you read up on MySQL injection to ensure a undesirable visitor cannot inject malicious queries into your database.

I would recommend PHP as I find it goes hand in hand with MySQL

Take a look at this to get you started: http://phpminiadmin.sourceforge.net/

演多会厌 2024-12-03 18:47:56

如果您仍然想制作自己的工具来管理 MySQL 数据库,请首先决定要使用什么语言来开发这些工具。

.NET/C# 与 WPF 相结合可以是一种很好的解决方案,当然是基于桌面的解决方案,但它也可以。

学习从来都不是烦人的事情。

If you still want to make your own tools for managing MySQL dbs start by making a decision about what language you want to develop these tools with.

.NET/C# combined with WPF can be a great a solution a desktop based one of course but it will do.

Learning is never annoying.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文