将所有变量从控制器传递到视图会产生什么后果?

时间:2017-09-27 18:14:16

标签: laravel laravel-5

如果我总是将所有变量传递给这样的视图会出现什么问题?

Sub MailGo()
 'Variable declaration
Dim oApp As Object, _
oMail As Object, _
WB As Workbook, _
FileName As String, MailSub As String, MailTxt As String

 'Turns off screen updating
Application.ScreenUpdating = False

 'Makes a copy of the active sheet and save it to
 'a temporary file
ActiveSheet.Copy
Set WB = ActiveWorkbook
FileName = "Text.xls"
On Error Resume Next
Kill "C:\" & FileName
On Error GoTo 0
WB.SaveAs FileName:="C:\Users\Public\Documents" & FileName

 'Creates and shows the outlook mail item
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.CreateItem(0)
With oMail
    .To = "wesley.x.sherow@us.tel.com"
    .Cc = ""
    .Bcc = ""
    .Subject = "LotInput"
    .Body = "LotInput"
    .Attachments.Add WB.FullName
    .Display
    .send
End With

 'Deletes the temporary file
WB.ChangeFileAccess Mode:=xlReadOnly
Kill WB.FullName
WB.Close SaveChanges:=False

 'Restores screen updating and release Outlook
Application.ScreenUpdating = True
Set oMail = Nothing
Set oApp = Nothing
End Sub

0 个答案:

没有答案