如何在xampp上运行cakephp应用程序

如何在xampp上运行cakephp应用程序,cakephp,Cakephp,我是CakePHP新手,我已经在Xampp上配置了CakePHP,它工作得非常好 我的文件夹结构是: 为了让它运行cakephp,我更新了Http.conf中的文档根目录(c:/xampp/hdocs/cakephp/app/webroot),它位于apache conf文件夹中 然后我开始使用ApacheCakPHP框架。浏览器显示了一个主页 我尝试运行简单的cakephp示例应用程序 c:/xampp/hdocs/polls/app/webroot 以同样的方式,我在xampp上配置

我是CakePHP新手,我已经在Xampp上配置了CakePHP,它工作得非常好

我的文件夹结构是:

为了让它运行cakephp,我更新了Http.conf中的文档根目录(c:/xampp/hdocs/cakephp/app/webroot),它位于apache conf文件夹中

然后我开始使用ApacheCakPHP框架。浏览器显示了一个主页

我尝试运行简单的cakephp示例应用程序

   c:/xampp/hdocs/polls/app/webroot
以同样的方式,我在xampp上配置了cakephp示例应用程序,并且还更新了http.conf。但当我运行服务器时,它不工作,只是在浏览器中显示空白页


提前感谢

如果您在浏览器中使用上面提供的路径,那么您只是在浏览器中查看该目录位置

您需要通过输入本地主机url或您可能设置的任何别名来检查本地apache Web服务器

http://localhost/<cakePHP app name>/<controller>/<action>/
http://localhost////
如果您想转到根cakephp应用程序,那么它将是

http://localhost/<cakephp app name>/
http://localhost//

希望有人觉得它有用

cakephp_3_x-x

xampp V3.2.1

第1部分(使用包含cakePHP的服务器测试cakePHP是否工作)

按照cakePHP教程创建数据库

在bake.bat中——添加php路径:

J:\xampp\php\php "%lib%cake.php" %*
  J:\xampp\php\php "%lib%cake.php" %*
DOS提示:

  J:\xampp\htdocs\cakephp-3-1-6>.\bin\cake bake all users
  J:\xampp\htdocs\cakephp-3-1-6>.\bin\cake bake all bookmarks
  J:\xampp\htdocs\cakephp-3-1-6>.\bin\cake bake all tags
  J:\xampp\apps\bookmarker>.\bin\cake bake all users
  J:\xampp\apps\bookmarker>.\bin\cake bake all bookmarks
  J:\xampp\apps\bookmarker>.\bin\cake bake all tags

  J:\xampp\htdocs\applications.html (create your own application section...:
          <!-- START cakephp-3-0-0 bookmarker -->
          <div align="center" class="module_table">
  )
  ...
  <div align="right" class="module_access"><a target="_blank" name="bookmarker" href="http://localhost:8787/bookmarks">Access</a></div>
  ...
cmd>cdj:\xampp\htdocs\cakephp-3-1-6

  J:\xampp\htdocs\cakephp-3-1-6>set PATH=%PATH%;J:\xampp\php\;
  J:\xampp\htdocs\cakephp-3-1-6>bin\cake server
看看

第2部分(例如,如果我们有8787端口可供虚拟主机使用)

重复(对于J:\xampp\apps\bookmarker)

在bake.bat中——添加php路径:

J:\xampp\php\php "%lib%cake.php" %*
  J:\xampp\php\php "%lib%cake.php" %*
DOS提示:

  J:\xampp\htdocs\cakephp-3-1-6>.\bin\cake bake all users
  J:\xampp\htdocs\cakephp-3-1-6>.\bin\cake bake all bookmarks
  J:\xampp\htdocs\cakephp-3-1-6>.\bin\cake bake all tags
  J:\xampp\apps\bookmarker>.\bin\cake bake all users
  J:\xampp\apps\bookmarker>.\bin\cake bake all bookmarks
  J:\xampp\apps\bookmarker>.\bin\cake bake all tags

  J:\xampp\htdocs\applications.html (create your own application section...:
          <!-- START cakephp-3-0-0 bookmarker -->
          <div align="center" class="module_table">
  )
  ...
  <div align="right" class="module_access"><a target="_blank" name="bookmarker" href="http://localhost:8787/bookmarks">Access</a></div>
  ...
2) 关键字:css工作:在webroot/.htaccess中

  #<IfModule mod_rewrite.c>
  #    RewriteEngine On
  #    ## RewriteBase J:\xampp\apps\bookmarker\src\
  #    RewriteCond %{REQUEST_FILENAME} !-f
  #    RewriteRule ^ index.php [L]
  #</IfModule>

  <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  </IfModule>

你能把你的apache错误日志发到什么地方吗?