gcloud部署php应用程序

时间:2016-09-16 10:34:30

标签: php google-app-engine gcloud app.yaml

我想使用以下文件夹结构在谷歌云上传和运行我的php应用程序:

enter image description here

yaml文件如下所示:

string strDSN = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Application.StartupPath + "\\Db1.accdb";
string strSQL = "SELECT * FROM Tbl1" ;
// create Objects of ADOConnection and ADOCommand
OleDbConnection myConn = new OleDbConnection(strDSN);
OleDbDataAdapter myCmd = new OleDbDataAdapter( strSQL, myConn ); 
myConn.Open();
DataSet dtSet = new DataSet();
myCmd.Fill( dtSet, "Tbl1" );
DataTable dTable = dtSet.Tables[0];
foreach( DataRow dtRow in dTable.Rows )
{
    listBox1.Items.Add( dtRow["id"].ToString());
    listBox2.Items.Add( dtRow["nm"].ToString());
    listBox3.Items.Add(dtRow["ag"].ToString());
}

当我部署它时,运行index.php文件,但不附加任何css或js文件。什么应该是yaml文件的结构,以便它接受来自css和js文件夹的css和js文件?

由于

1 个答案:

答案 0 :(得分:0)

试试这个(处理程序的顺序很重要)

application: <your-app-id-goes-here>
runtime: php55
api_version: 1

handlers:

- url: /css
  static_dir: css

- url: /js
  static_dir: js

- url: /images
  static_dir: images

- url: .*
  script: index.php