简体   繁体   English

无法使用简单的Web应用程序部署/继续前进

[英]Unable to deploy/move forward with simple web app

Beginning details: 开始细节:

  1. Windows 7 Professional 64 bit Windows 7专业版64位
  2. WAMP Version: 2.5 WAMP版本:2.5
  3. MySQL Version: 5.6.17 MySQL版本:5.6.17
  4. PHP Version: 5.5.12 PHP版本:5.5.12
  5. Apache Version: 2.4.9 Apache版本:2.4.9

I also have Git, Heroku Toolbelt, etc. 我也有Git,Heroku Toolbelt等。


I'm trying to deploy a PHP inventory web app I have on my computer using Heroku. 我正在尝试使用Heroku在我的计算机上部署我的PHP库存Web应用程序。

Currently, it's installed on my PC using WAMP server. 目前,它使用WAMP服务器安装在我的PC上。 Up to this point, it was just a web app used at a country club where any computer/phone/tablet could access and adjust inventory as long as they were on the same wireless network as the server. 到目前为止,它只是一个在乡村俱乐部使用的网络应用程序,只要它们与服务器在同一个无线网络上,任何计算机/手机/平板电脑都可以访问和调整库存。

Right now, I'm trying to get to the point where the country club can access the app from anywhere, and figured, I could host it on Heroku. 现在,我正试图让乡村俱乐部可以从任何地方访问应用程序,并想通知,我可以在Heroku上托管它。

Every tutorial I watch/read explains how to deploy a single index.php file that contains a single line of code saying something like, "Hello world!" 我观察/阅读的每个教程都解释了如何部署单个index.php文件,该文件包含一行代码,例如"Hello world!" , but this app contains 8 folders and 22 PHP files, all in the "www" file of WAMP. ,但这个应用程序包含8个文件夹和22个PHP文件,都在WAMP的“www”文件中。 I've tried learning the concepts of how this works (creating a single file for everything; trying to deploy the index.php I already have, etc.) 我已经尝试过学习如何工作的概念(为所有内容创建单个文件;尝试部署我已经拥有的index.php等)

I have tried tutorials and a lot of Heroku reading and attempts, but I'm unable to move forward with anything in terms of adding user authentication or the ability to sell it to restaurants/country clubs. 我已经尝试了教程和大量的Heroku阅读和尝试,但我无法继续推进添加用户身份验证或将其出售给餐馆/乡村俱乐部的能力。 I've combed through every word on Heroku tutorials, and I don't run into a single error during anything I try, but at the end of it all, when I try "heroku open", it opens up a blank page. 我已经梳理了Heroku教程中的每一个字,并且在我尝试的任何事情中都没有遇到任何错误,但最后,当我尝试“heroku打开”时,它会打开一个空白页面。

My "www" directory contains: - cgi-bin - css - dbBackup - img - inc - js - tcpdf 我的“www”目录包含: - cgi-bin - css - dbBackup - img - inc - js - tcpdf
- tmp - tmp

Then, there are all the PHP files of the different functions of the app listed below those. 然后,下面列出了应用程序的不同功能的所有PHP文件。

My main question here is...what is the file that gets deployed on Heroku in this situation? 我的主要问题是......在这种情况下,在Heroku上部署的文件是什么? I don't understand how the CSS, JS, and other database-related functions are included in a single index.php file that is apparently the file that's deployed when you launch a web app like this. 我不明白CSS,JS和其他数据库相关的函数是如何包含在单个index.php文件中的,该文件显然是在启动这样的Web应用程序时部署的文件。

Thank you! 谢谢!

The default page loaded when a site is accessed is typically "index.html" or "index.htm". 访问站点时加载的默认页面通常是“index.html”或“index.htm”。 This file would normally have the content to create the initial splash page with links to the different services you might offer. 此文件通常具有创建初始启动页面的内容,其中包含指向您可能提供的不同服务的链接。 Those services are what you would use php for with the supporting data in your MySQL database. 这些服务是您使用php来获取MySQL数据库中的支持数据的服务。 In addition to copying your base files and directories over to the Heroku server, you will also need to create the MySQL tables and then populate them with data. 除了将基本文件和目录复制到Heroku服务器之外,还需要创建MySQL表,然后用数据填充它们。 This is a relatively simple process using the MySQL Workbench. 这是一个使用MySQL Workbench的相对简单的过程。 It may be tedious if you have lots of tables and schema, but it is relatively simple. 如果你有很多表和架构可能会很乏味,但它相对简单。 Comment back if you need help in this area or would like to discuss further. 如果您在这方面需要帮助或想进一步讨论,请回复。

Heroku runs a standard web server and looks for "index.php" as your starting file by default. Heroku运行标准Web服务器,默认情况下查找“index.php”作为起始文件。 You should have either an "index.htm", "index.html", or "index.php" file in your current base (www) directory. 您当前的基本(www)目录中应该有“index.htm”,“index.html”或“index.php”文件。 If you don't then it's likely that you currently start your app by going to a URL (www.yourwebsite.com) followed by a slash and some other text, such as "/tcpdf/startup.html". 如果不这样做,那么您当前可能会通过访问URL(www.yourwebsite.com),然后使用斜杠和其他一些文本(例如“/tcpdf/startup.html”)来启动您的应用。
If you have one of the index. 如果你有一个索引。 files, then that's your starting point. 文件,然后那是你的起点。 Copy the complete set of files and directories over to your heroku site and then test it based on the URL they have given you, which will automatically look for an 'index.php' file. 将完整的文件和目录集复制到您的heroku站点,然后根据他们给您的URL进行测试,这将自动查找“index.php”文件。 You will need to back up and restore your database from your local system to the heroku server, which is relatively straightforward using the mysql workbench. 您需要将数据库从本地系统备份和还原到heroku服务器,这使用mysql工作台相对简单。 You'll need to recreate the users and their schema permissions on the heroku site so that the php files can access the new database. 您需要在heroku站点上重新创建用户及其架构权限,以便php文件可以访问新数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM