Download the latest version of WAMP from http://www.wamp.org.
WAMP installation guide
1. Double click on the wamp installation executable (we have used WampServer2.0i.exe ) to start the installation.
2. Select I accept the agreement.
3. Select destination folder.
4. Select whether you want a Quick launch icon and desktop icon.
5. Click Install to beginning the installation.
6. Installation progresses.
7. Select the default browser WAMP server going to use.
8. Installation is being finished.
9. Supply PHP mail parameters and click next. This finishes the installation.
10. Testing if PHP is installed properly.
Create a php file containing code <?php echo phpinfo(); ?> and save it as test.php.
Run this file on your web server and if you get an output like this :
then your WAMP installation is working properly.
After you have successfully installed WAMP, an icon comes in the right-hand corner of the Taskbar. Click on that icon and from here you start / restart /close Apache, PHP, and MySQL. You can also change settings of Apache,PHP, and MySQL.
PHP: Tips of the Day
PHP: How to convert string to boolean?
Strings always evaluate to boolean true unless they have a value that's considered "empty" by PHP (taken from the documentation for empty):
- "" (an empty string);
- "0" (0 as a string)
If you need to set a boolean based on the text value of a string, then you'll need to check for the presence or otherwise of that value.
$test_mode_mail = $string === 'true'? true: false;
EDIT: the above code is intended for clarity of understanding. In actual use the following code may be more appropriate:
$test_mode_mail = ($string === 'true');
or maybe use of the filter_var function may cover more boolean values:
filter_var covers a whole range of values, including the truthy values "true", "1", "yes" and "on".
Ref : https://bit.ly/33SQ3eP
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework