Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Class not found error, how do I reference classes?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #183981
    matthisco
    Participant

    Hello,

    I’m trying to include a php class for use with swiftmailer, but keep getting this error:

    PHP Fatal error: Class ‘Swift_AWSTransport’ not found in C:\inetpub\wwwroot\tester.php on line 7

    The Swift_AWSTransport references a base class, how would I go about referencing this base class from the class above?

    Here is my original reference in my tester.php:

    <?php
      require_once 'swift/lib/swift_required.php';
     
      // Create the Transport the call setUsername() and setPassword()
    $transport = Swift_AWSTransport::newInstance('smtp.example.org', 25)
    
    #184119
    __
    Participant

    I’m trying to include a php class for use with swiftmailer, but keep getting this error:

    You need to make sure the class definition is included before trying to use it. What file is the class definition found in?

    The Swift_AWSTransport references a base class, how would I go about referencing this base class from the class above?

    Autoloading is the best solution to this, but it will require some study on your part and might require re-arranging how your files are organized.

    Otherwise, you would need to include each class definition in the class hierarchy manually.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.