Failed opening required 'PHPMailer-master/PHPMailerAutoload.php' (include_path='.:/usr/share/pear:/usr/share/php')

后端 未结 2 757
孤城傲影
孤城傲影 2021-01-29 11:28

I have a hosting server where i have written a php code which is giving me an error, i cant access php.ini as its a hosting server to change anythng

Error

相关标签:
2条回答
  • 2021-01-29 12:13

    You could check your current working directory, like this:

    echo getcwd();
    

    If you do so, you will see which is your active folder. The next thing you need to do is to check whether there is a PHPMailer-master folder inside your active folder (case-sensitive if you are using Linux). If it does not exist, then you will need to point to the right location instead or to create the folder and copy the file(s) into it. If it exists, check whether you have the necessary privileges and whether there is a file called PHPMailerAutoload.php inside that folder (again, case-sensitive if you are using Linux).

    0 讨论(0)
  • 2021-01-29 12:16

    This isn't rocket science - the error message is very clear - you just need to use the correct path to the autoloader (and the rest of the PHPMailer files), wherever that is for your server. No need to edit php.ini.

    0 讨论(0)
提交回复
热议问题