如何在XAMPP中使用站点文件配置CodeIgniter?
我最近接管了另一个开发人员的一个项目,我们称其为eBay。我正在努力将他们的现场站点启动并在本地服务器上运行,以进行测试和调试。他们已经使用CodeIgniter构建了Web应用程序。在CPANEL上的文件管理器中,他们将CI文件夹放在根部,而不是public_html文件夹中。
我已经将他们的public_html文件和CI文件夹复制到了我的XAMPP的HTDOCS文件夹中。问题在于,仅当将CI文件夹放置在eBay的文件夹中时,该站点才会加载。求心时,当我加载Localhost网站时,会提供一条错误消息,即它在eBay文件夹中找不到CodeIgniter文件夹。
这怎么样?该应用程序如何在实时站点上的根网站上使用CI文件夹运行,但是当我将其迁移到XAMPP的HTDOC时,它希望CI文件夹在eBay文件夹中?
I've recently taken over a project from another developer, let's call it EBAY. I'm struggling to get their live site up and running on my local server for testing and debugging. They've built a web app using CodeIgniter. In their file manager on cPanel they've placed the ci folder at the root, not in the public_html folder.
I've copied their public_html files and their ci folder into my xampp's htdocs folder. The issue is that the site only loads when the ci folder is placed WITHIN the folder for EBAY. Oherwise when I load the localhost site it gives an error message that it cannot find the codeigniter folder inside EBAY folder.
How is this? How can the application run with the ci folder at the root on the live site, but when I have migrated it to the htdocs of xampp it is expecting the ci folder to be inside the EBAY folder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如今,这种配置非常普遍,如果您查看Linux或Pear,您会发现PHP文件有时完全在WebServer以外的其他目录中。
它背后的想法非常简单但有效:
因此,它们无法更改,下载甚至只是查看。
好的,到目前为止是一个解释。现在关于您的问题:
当前,您当前是XAMPP中的Web Folder
HTDOC
,通常您可以将子文件夹用作Web Folder,在HTDOC中,您可以直接将不公开的项目文件放置。您可以调整域指向的位置(DOCROOT和/或虚拟主机)。This kind of configuration is quite common nowadays, and if you look at Linux or Pear you'll discover that PHP files sometimes are completely in other directories than the webserver.
The ideas behind this are pretty simple but effective:
So they can't be altered, downloaded or even just viewed.
Ok, so far an explanation. Now about your issue with it:
You've currently a webfolder
htdocs
in Xampp and in general you can use a subfolder as the webfolder and in htdocs directly you place the project files that are not public. You've to adjust then where the domain is pointing (docroot and/or virtual hosts).