Publish: 2020-05-31 | Modify: 2020-05-31
Zdir is a directory listing program developed using PHP. It does not require a database and is easy to install and use. The following are the updates in version 1.50.
static/tongji.js
and add website statistics code, Zdir will automatically load itconfig.php
config.json
supports ad settingsThis version allows Zdir to be installed in a subdirectory
Starting from version 1.50
, Zdir supports installation in a subdirectory. For example, if your site directory is /data/wwwroot/default
, you can place the Zdir source code in /data/wwwroot/default/zdir
. To run it in a subdirectory, you need to set up URL rewriting. Please refer to the documentation for more details: https://www.yuque.com/helloz/zdir/install
Support for adding statistics code
In this version, you can create a tongji.js
file in the Zdir directory and put the website statistics code in it. Zdir will automatically load it. Note that the statistics code does not need the script
tag. Baidu statistics code has been tested successfully, other statistics codes have not been tested.
Left and right floating ad settings
This version supports setting left and right floating ads on the website. You need to create a file named config.json
in the Zdir directory. The content should be as follows:
{
"gg":{
"gg_left":"<a href='https://dwz.ovh/d' target='_blank' rel='noopener noreferrer'><img src='https://dwz.ovh/c'></a>",
"gg_right":"<a href='https://blog.xiaoz.org/archives/11183' target='_blank' rel='noopener noreferrer'><img src='https://i.bmp.ovh/imgs/2019/11/39adab31131a53a8.png'></a>"
}
}
The display effect is shown in the following image:
Since the directory structure has changed in this version, it is recommended to backup the data and reinstall Zdir.
Scan the QR code below. Donations of more than 30 yuan
will receive the donor version, which includes initial technical support and ad removal. After donation, please contact my QQ: 337003006 to obtain it.
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.