新しい Codeigniter アプリケーションをローカルで作成しようとしています。適切なベストプラクティスに適合するのに役立つ正しいファイル構造を使用する必要があることに興味があります。MAMP 内のデフォルトのルート ディレクトリは変更していません。私がやりたいことは、ライブ サイトにアップロードする準備ができたときに、それが機能するために追加する必要がないようにセットアップすることです。システム フォルダーとアプリケーション フォルダーの正しい場所が表示されるように、index.php ファイルを構成しています。サイト 1 がメイン サイトです。
今私はこれを持っています:
ローカル
/MAMP
    /htdocs
        /sites
            /site1
                /system
                /application
                /public_html
                    index.php
            /site2
                /system
                /application
                /public_html
                    index.php
            /site3
                /system
                /application
                /public_html
                    index.php
住む
/root
    /application
    /dev
        /site1
            /application
            /system
            /public_html
                index.php
                .htaccess
        /site2
            /application
            /system
            /public_html
                index.php
                .htaccess
    /sites
        /site3
            /application
            /system
            /public_html
                index.php
                .htaccess
        /site4
            /application
            /system
            /public_html
                index.php
                .htaccess
    /public_html
        /public_html
            /assets
                /css
                /js
                /images
            index.php
            .htaccess
    /system