Comments (5)
少し補足します。
config.php
のホームパス設定のindex.html
への反映が、
potiboard.php
実行時にあると思っていたのですがそうではないようで気になりました。
from poti-kai.
define('HOME', '../');
ここのHOMEは、ウェブサイト(あるいはブログ)のトップページへの戻り先です。
ホームページがあってそこに掲示板があるからホームページに戻るリンクが必要…という歴史的背景からそうなっています。
掲示板が6つあるウェブサイトなら6つの掲示板の入り口がHOMEかもしれません。
もしお絵かき掲示板がウェブサイトのトップページなら
define('HOME', './');
となります。
もしウェブサイトのトップページが別ドメインなら
define('HOME', 'https://hoge.ne.jp/');
のようにurlアドレスを入力します。
お絵かき掲示板で生成されるindex.htmlは投稿のたびに上書きされます。
つまりそのファイルを変更してもpotiboard.phpが新しく作り直してしまいます。
ソースをおいかけるなら…ですが、
potiboard.php
の
function init()
で最初の1発言目のindex.htmlを作成しています。
P.S.
ぷにゅねっとさんのマニュアルの通りに設置すると2020年の環境では動作しない事があります。
いったん忘れていただけるとありがたいです。
from poti-kai.
config.phpのホームパス設定のindex.htmlへの反映が、
potiboard.php実行時にあると思っていたのですがそうではないようで気になりました。
質問の意図がどこにあるのか、いまいち汲み取る事が出来なかったのでもしかしたら…でレスしています。
index.htmlが上書きされるタイミング
まだindex.htmlが無い時にpotiboard.phpにアクセスすると
function init()
が動作してindex.htmlを作ります。
すでに運用している時は、
管理→UPDATE
またはなんでもいいので書き込みます。
そのタイミングでログファイルやconfig.phpの設定を反映してindex.htmlを上書きします。
potiboard.phpにアクセスするだけでは上書きされず
updatelog();
を呼ぶタイミングで上書きします。
potiboard.phpにアクセスがあるたびにindex.htmlを更新する設計にするとログファイルをもとにすべてのスレッドをHTMLとして出力しているので全HTMLファイルを更新する事になります。
もし200ページあったとしたら、HTMLファイル200ファイル分をログファイルを読み取ってファイルの存在確認などの処理も行って出力する事になります。
ログファイルが大きくなってくるとこの更新に時間がかかるようになります。
2年前の最初のバージョンと比較して約1/4の時間ですむように改良しましたが5000発言ぐらいある場合はそれでも重く感じられるかもしれません。
//入り口ファイル名
define('PHP_SELF2', 'index.html');
が、
//入り口ファイル名
define('PHP_SELF2', 'hoge.html');
に変更されていたら
掲示板の入り口ファイルのHTMLは、
hoge.html
になります。
ただし、
//入り口ファイル名
define('PHP_SELF2', '../../index.html');
のようにファイル名にパスを追加する事はできません。
from poti-kai.
丁寧なご返信ありがとうございます!
config.php
編集後の更新タイミングが気になっていましたが、
以下2パターンということで納得しました。
投稿しない限りindex.htmlは更新されないのも分かっていませんでした。
index.htmlが無い時にpotiboard.phpにアクセスすると
function init()
が動作してindex.htmlを作ります。
お絵かき掲示板で生成されるindex.htmlは投稿のたびに上書きされます。
【config.phpのindex.html反映タイミング】
①index.htmlがない場合、potiboard.phpアクセス時
②画像の投稿時
from poti-kai.
【config.phpのindex.html反映タイミング】
①index.htmlがない場合、potiboard.phpアクセス時
②画像の投稿時
それにくわえて、管理画面→パスワードを入力してUPDATE(ログ更新)になります。
よろしくお願いします。
from poti-kai.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poti-kai.