PHP, Swift-mailer problem

前端 未结 4 583
灰色年华
灰色年华 2020-12-07 02:51

When I click submit button on my contact page, trying to submit a form that uses swift-mailer, I get this:

Warning: fopen(uploads/) [function.fopen]

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 03:11

    You need to supply the full path to uploads not a realtive path because that is going to be interpreted as relative to class file that tries to open your attachment.

    Try using realpath before passing the path to Swift.

    $path = realpath('uploads/');

提交回复
热议问题