


114la source code (114la) cannot generate local real estate and local newspapers and periodicals. The solution to the problem of level 4 pages with 0 bytes_PHP tutorial
After a period of debugging and analysis, I found that a function was written very messily. It was probably left behind during the revision. After a period of modification and debugging, I finally generated a level 4 page normally. I dare not use it alone, so I will share it with everyone.
I hope it will be helpful to those who want to use the 114la source code but want to give up because of this problem.
Find the modules directory under the management directory and find the mod_make_html.php file.
Replace the get_html_4catalog($cid) function with the following code to generate a level 4 page normally.
/**
* Generate 4-level classification HTML
*
* @param int $cid
* @return string
*/
private static function get_html_4catalog($cid)
{
$timestamp = $_SERVER['REQUEST_TIME'];
$output = '';
$cid = intval($cid);
$dir_tpls_main = mod_config::get_one_config('yl_dirtplmain');
empty($dir_tpls_main) && $dir_tpls_main = 'default';
$path_tpls_main = PATH_TPLS_MAIN . '/' . $dir_tpls_main . '/class';
app_tpl::assign('URL', URL, $path_tpls_main);
$class_list = mod_class::get_class_list();
if ($cid {
return false;
}
/*
* 取得页头
*/
app_tpl::$instance = null;
if (!empty($class_list[$cid]['classname']))
{
$class_name = $class_list[$cid]['classname']; // 2级目录
}
unset($title);
$title = (!empty($class_name)) ? $class_name . '-' . mod_config::get_one_config('yl_sysname') : mod_config::get_one_config('yl_sysname');
app_tpl::assign('title', $title, $path_tpls_main);
// 内页不填写 keywords 和 description 的时候调用系统默认
$class_meta_keyword = empty($class_list[$cid]['keywords']) ? mod_config::get_one_config('yl_metakeyword') : $class_list[$cid]['keywords'];
$class_meta_description = empty($class_list[$cid]['description']) ? mod_config::get_one_config('yl_metadescrip') : $class_list[$cid]['description'];
app_tpl::assign('class_meta_keyword', $class_list[$cid]['keywords'], $path_tpls_main);
app_tpl::assign('class_meta_description', $class_list[$cid]['description'], $path_tpls_main);
// 热门关键字
//app_tpl::assign('search_keyword', self::get_hot_keyword(), $path_tpls_main);
$parent_id = $class_list[$cid]['parentid'];
if (!empty($parent_id))
{
$parent_class_name = $class_list[$parent_id]['classname'];
// 注意自定义路径
$parent_path = $class_list[$parent_id]['path'];
$parent_filepath = (empty($parent_path)) ? URL_HTML . '/catalog/' . $parent_id . '.htm' : URL_HTML . "/{$parent_path}/index.htm";
app_tpl::assign('parent_class_name', "" . $parent_class_name . "", $path_tpls_main);
}
if (!empty($class_name))
{
app_tpl::assign('current_class_name', $class_name, $path_tpls_main);
}
$site_list = array(); //站点列表
$key_list = array(); //分类导航
$query = app_db::query('SELECT * FROM ylmf_class WHERE parentid = ' . $cid . ' ORDER BY displayorder');
while ($info = app_db::fetch_one($query))
{
$result = app_db::select('ylmf_site', '`id`, `name`, `url`, `class`, `displayorder`, `good`, `namecolor`',
"class = '{$info['classid']}' AND starttime = $timestamp) ORDER BY displayorder");
$tmp_site = array();
if (!empty($result))
{
foreach ($result as $site)
{
substr($site['url'], -1) == '/' && $site['url'] = substr($site['url'], 0, -1);
$site['good'] = (empty($site['good'])) ? '' : '√';
if ($site['endtime'] > 0 && $timestamp > $site['endtime'])
{
$site['name'] = 'NULL';
$site['url'] = '#';
}
$site['domain'] = get_domain($site['url']);
$tmp_site[] = $site;
}
}
$info['url'] = '#' . $info['classid'];
$key_list[$info['classname']] = $info;
$site_list[$info['classname']] = $tmp_site;
}
app_tpl::assign('key_list', $key_list, $path_tpls_main);
app_tpl::assign('site_list', $site_list, $path_tpls_main);
unset($rt, $key_list, $site_list);
/*
* 取得主体页尾
*/
app_tpl::$instance->compile_id = mod_config::get_one_config('yl_dirtplmain');
//如果自定义了模版,使用自定义的模版,否则使用默认的 class.tpl 模版
$template = empty($class_list[$cid]['template']) ? 'class.tpl' : $class_list[$cid]['template'];
app_tpl::assign('icp', mod_config::get_one_config('yl_icp'), $path_tpls_main);
app_tpl::assign('icpurl', mod_config::get_one_config('yl_icpurl'), $path_tpls_main);
app_tpl::assign('tongji', mod_config::get_one_config('yl_ipstat'), $path_tpls_main);
$output = app_tpl::fetch($template, $path_tpls_main);
return $output;
}
Original text: http://www.cnblogs.com/cnwgy/archive/2012/01/10/2318413.html

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools