dokuwiki learning (1) - increase page namespace

First, we need to add namespaces and articles in the background. Namespaces are added in the background first.

Switch to the /var/www/html/dokuwiki/data/pages directory to
create a folder "pre-production file", and create the file quasi-production test.txt in this folder.
Create a folder "Daily Work Records", and create a file daily test.txt in this folder.
Create a folder "Configuration File", and create a file configuration file test.txt in this folder.
write picture description here
The folder will be used as the new namespace, and the txt file will be used as the article under this namespace. As shown below

Note: After creating a new namespace, there must be articles under the namespace, otherwise the namespace will not exist. Articles must contain content, otherwise the article will be automatically deleted.

Problem: When viewing the page, I found that Chinese articles cannot be displayed under the Chinese namespace!
Solution: Enter the /inc folder in the dokuwiki installation directory, then vim open the pageutils.php file, search for utf8_encodeFN, and comment the following two lines in the function after finding it.

//    $file = urlencode($file);
//    $file = str_replace('%2F','/',$file);

In the same way, search for utf8_decodeFN, and comment this line in the function after finding it.

//  return urldecode($file);

After the comment, add the following sentence

return $file;

After modification, save and exit. When re-viewing the namespace, the Chinese articles are displayed. As shown below.
write picture description here

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326662867&siteId=291194637