Here, is a list of some useful code snippets which will help PHP Developers while writing PHP scripts..
Email address check
Checks for a valid email address using the php-email-address-validation class.
Random Password Generator
Follow the below code to generate random password function for PHP. It allows the developer to customize the password. Include below function anywhere in your code to use it.
Force downloading of a file
Apply this code to forces a user for downloading a file, for e.g you have an image but you want the user to download it instead of displaying it in his browser.
Sending mail
Using PHPMailer
PHPMailer is a powerful email transport class with a small footprint and big features that is simple to use and integrate into your own software.
Uploading of files
Using class.upload.php from Colin Verot
Email address check
Checks for a valid email address using the php-email-address-validation class.
Random Password Generator
Follow the below code to generate random password function for PHP. It allows the developer to customize the password. Include below function anywhere in your code to use it.
Force downloading of a file
Apply this code to forces a user for downloading a file, for e.g you have an image but you want the user to download it instead of displaying it in his browser.
Sending mail
Using PHPMailer
PHPMailer is a powerful email transport class with a small footprint and big features that is simple to use and integrate into your own software.
Uploading of files
Using class.upload.php from Colin Verot
0 comments:
Post a Comment