当我尝试运行此代码时,为什么会出现语法错误?
选择 | 换行 | 行号
- x=3
- title = "PHP Programing"
- author = "LERDORF"
- publisher = "oreily"
- major = "cent"
- outfile = open("book.html","w")
- outfile.write ('<html>\n')
- outfile.write (' <body>\n')
- while ( x > 1 ):
- outfile.write(' <p class= "title">' + title +'</p>\n')
- outfile.write(' <p class= "author">' + author +'</p>\n')
- outfile.write(' <p class= "publisher">' + publisher '</p>\n')
- x = x - 1
- outfile.write (' </body>\n')
- outfile.write (' </body>\n')
- outfile.close()