2015年8月20日 星期四

CodeIgniter 3 404 Page Not Found The page you requested was not found.

當你發現 CodeIgniter 3 在windows 執行好好的,但是移到 ubuntu 或linux上後 會發現全部變成,404 Page Not Found  The page you requested was not found.


如果 .htaccess  設定了
也確定  $config['uri_protocol'] = 'REQUEST_URI'; (CI3 預設就是這個)
php CGI/FastCGI 也啟動了。
apache  CGI 也開啟。


還是一直錯誤的話!!!

有個原因是 CI3 在 linux 底下的所有 controller   開頭都要以大寫為準!!
例如: 

rest.php <----Not Found
Rest.php<-----can Found

這是ci3特有的問題。

我是參考這句話:

I found the solution for who uses Code Igniter 3.0 the controller name needs to be like this "Pagecontrol" if is "pagecontrol" the CodeIgniter core do not find the controller, libraries, views, and things like this.

出處為:http://stackoverflow.com/questions/28368658/404-code-igniter-on-a-live-web-server


2015年4月11日 星期六

The following classes could not be found: - android.support.v7.internal.widget.ActionBarOverlayLayout on android studio

Layout Rendering Problems on android studio


環境:android studio 1.1.0
編譯版本: API 22

當使用android studio 創建專案(create Project) 時,你的專案最小相容版本(minSdkVersion )  低於21時,經常在layout/activity_main.xml檔案 在顯示圖形化時經常會遇到以下錯誤,就算你照他的Fix Build Path, Edit XML, Create Class三個選項下去操作,還是不會有任何反應


The following classes could not be found: - android.support.v7.internal.widget.ActionBarOverlayLayout (Fix Build Path, Edit XML, Create Class) Tip: Try to build the project.



所以要去build.gradle 加入下面這行,就不會有錯誤拉。

compile 'com.android.support:gridlayout-v7:22.0.0'

或者

到file->Project->APP->Dependencies->right + ->Library Dependency -> lookup com.android.support:gridlayout-v7:22.0.0-> OK




2015年3月23日 星期一

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

在android studio 通常遇到這個問題時,是因為當你重A Activity intent到B Activity 時當兩個頁面主題不一樣時就會出現錯誤。

     Intent ==>>                 
 

就會出現錯誤。

所以只要去AndroidManifest.xml 加入
<activity
            android:name=".PieChart"
            android:label="@string/title_activity_pie_chart"
            android:theme="@style/Theme.AppCompat" ><!--注意變換主題-->
        </activity>

但是要注意的是 主題會依照你要轉跳過去的頁面而動。


2015年3月18日 星期三

androidmanifest.xml doesn't exist or has incorrect root tag 錯誤怎麼辦?


當你在androidstudio開啟舊的project後,發現上次可執行的專案竟無法執行時,結果發現 androidmanifest.xml 所以關聯的文字都無法抓到,在Edit Configuration的錯誤訊息為
要麼辦呢?

其實只要按下  讓他同步就可以摟~


參考:http://stackoverflow.com/questions/17424135/android-studio-android-manifest-doesnt-exists-or-has-incorrect-root-tag