我应该如何入手?求指点
我现在想做一个 网站,php的,
数据表里有市,县,乡,村 我想乡首页或者村首页能显示相应的乡或者村的介绍,后台添加内容,请问这个应该是怎样一个数据结构,有没有相应的 系统可以参考,
请指点,,,, 拜谢
回复讨论(解决方案)
可以用dedecms,直接实现你的功能。
这就是一个亲戚的关系啊,根据父id来判断子是哪里的,这基本就可以了,如果要无限分类的话,设一个path
教育 历史人文 社会科学 自然科学 职业技能 TED演讲 电影 动作 动作01 动作02 动作03 动作04 科幻 科幻01 科幻02 科幻03 科幻04 喜剧 喜剧01 喜剧02 喜剧03 偶像 恐怖 战争 电视 肥皂剧 古装剧 韩剧 金典老片 四大名著 历史回顾 综艺 娱乐 访谈 财经 婚恋 求职 选秀 时尚 搞笑
这就是一个亲戚的关系啊,根据父id来判断子是哪里的,这基本就可以了,如果要无限分类的话,设一个path
Plain Text code
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
教育
历史人文
社会科学
自然科学
职业技能
TED演讲
电影
动作
动作01
动作02
动作03
动作04
科幻
科幻01
科幻02
科幻03
科幻04
喜剧
喜剧01
喜剧02
喜剧03
偶像
恐怖
战争
电视
肥皂剧
古装剧
韩剧
金典老片
四大名著
历史回顾
综艺
娱乐
访谈
财经
婚恋
求职
选秀
时尚
搞笑
求代码,高手请指教
代码是跟随你的数据的
你给出数据组织方式,才会有相应的代码
id,pid,name,description根据你目前写出来的东西,数据表就这几个字段,pid就是行政区上一级的id,比如村的pid就是它上面乡的id,乡的pid就是上一级县的。
至于乡首页显示乡介绍,村首页显示村介绍。这个太简单了吧?只要通过id来调取相应记录的description就可以了。
无限分类表,轻松实现无压力
轻松简单。。。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Laravel simplifies HTTP verb handling in incoming requests, streamlining diverse operation management within your applications. The method() and isMethod() methods efficiently identify and validate request types. This feature is crucial for building

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:
