Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 我应该如何入手?求指点

我应该如何入手?求指点

Jun 23, 2016 pm 02:21 PM

我现在想做一个 网站,php的,    

数据表里有市,县,乡,村     我想乡首页或者村首页能显示相应的乡或者村的介绍,后台添加内容,请问这个应该是怎样一个数据结构,有没有相应的 系统可以参考,
请指点,,,,   拜谢


回复讨论(解决方案)

可以用dedecms,直接实现你的功能。

这就是一个亲戚的关系啊,根据父id来判断子是哪里的,这基本就可以了,如果要无限分类的话,设一个path 

  教育      历史人文      社会科学      自然科学      职业技能      TED演讲   电影      动作         动作01         动作02         动作03         动作04      科幻         科幻01         科幻02         科幻03         科幻04      喜剧         喜剧01         喜剧02         喜剧03      偶像      恐怖      战争   电视      肥皂剧      古装剧      韩剧      金典老片      四大名著      历史回顾   综艺      娱乐      访谈      财经      婚恋      求职      选秀      时尚      搞笑
Copy after login

这就是一个亲戚的关系啊,根据父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就可以了。

无限分类表,轻松实现无压力

轻松简单。。。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

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-

cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

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.

Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

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' =>

12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

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: Best Practices for PHP Log Analysis PHP Logging: Best Practices for PHP Log Analysis Mar 10, 2025 pm 02:32 PM

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

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

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

HTTP Method Verification in Laravel HTTP Method Verification in Laravel Mar 05, 2025 pm 04:14 PM

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

Discover File Downloads in Laravel with Storage::download Discover File Downloads in Laravel with Storage::download Mar 06, 2025 am 02:22 AM

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:

See all articles