我已經使用SLIM框架創建了API。當我在PHP 5.3中運行這些API時,這些API運行正確但是當我在具有PHP 5.2的系統上運行這些時,這些都不起作用。SLIM框架中的錯誤
這是一個名爲.htaccess的文件,它在PHP 5.2中創建問題。
這下面是.htaccess文件的代碼
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
請告訴我,我應該怎麼做才能運行我在PHP 5.2的API也
預先感謝您。
這與您之前詢問的問題不一樣嗎? http://stackoverflow.com/questions/9278813/unable-to-call-api-of-slim-framwork我看不到這個.htaccess文件是如何導致PHP中的錯誤。您的實時服務器是否允許.htaccess文件('AllowOverride')? – Treffynnon 2012-02-15 09:09:16
是的,先生這與我以前的問題幾乎相同,但它更接近我的問題,這就是爲什麼我張貼這也。如果你覺得這是重複的,那麼你可以刪除它。 – 2012-02-15 09:12:32