Difference between revisions of "PHP"
Line 5: | Line 5: | ||
==PHP Versions== | ==PHP Versions== | ||
− | + | We support all of the current PHP versions on both our Windows and Linux servers. This includes PHP versions 5.3, 5.4, 5.5 and 5.6. Our control panels allow you to choose which version of PHP you would like to use for your site. | |
===PHP Version - Windows=== | ===PHP Version - Windows=== | ||
− | + | In the control panel, you could control which version of PHP your site uses by going to the "PHP Settings" icon under "Website Settings". | |
===PHP Version - Linux=== | ===PHP Version - Linux=== | ||
− | + | You could change the version of PHP for your site by logging into cPanel and clicking on "Select PHP Version" under "Software and Services". Choose the version from the drop-down menu and click on "Set as current" | |
+ | |||
==Can I view the PHP configuration for my site?== | ==Can I view the PHP configuration for my site?== |
Revision as of 19:17, 1 April 2015
Contents
Do you support PHP?
Yes, we support PHP on all of our Windows and Linux hosting servers.
PHP Versions
We support all of the current PHP versions on both our Windows and Linux servers. This includes PHP versions 5.3, 5.4, 5.5 and 5.6. Our control panels allow you to choose which version of PHP you would like to use for your site.
PHP Version - Windows
In the control panel, you could control which version of PHP your site uses by going to the "PHP Settings" icon under "Website Settings".
PHP Version - Linux
You could change the version of PHP for your site by logging into cPanel and clicking on "Select PHP Version" under "Software and Services". Choose the version from the drop-down menu and click on "Set as current"
Can I view the PHP configuration for my site?
Yes, to do this you'll just need to create a .php file with the following code and browse to the file:
<?php phpinfo(); ?>
Do you support cURL in PHP?
Yes, we support cURL.
mhash - Is the mhash library supported?
Yes, the mhash libary is supported with PHP.
magic-quotes - How can I disable magic-quotes?
To disable magic_quotes you will need to change the following lines in your php.ini from:
;magic_quotes_gpc = Off ;magic_quotes_runtime = Off
To:
magic_quotes_gpc = Off magic_quotes_runtime = Off
How can I use PHP to have a form email me the results?
Here is a sample PHP script that uses submitted form information to send an email:
<?php if ($_POST['to'] && $_POST['from']) { $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$_POST['from']." <".$_POST['from'].">\r\n"; $headers .= "To: ".$_POST['to']." <".$_POST['to'].">\r\n"; $headers .= "Reply-To: ".$_POST['from']." <".$_POST['from'].">\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High\r\n"; $headers .= "X-Mailer: A Server"; mail($_POST['to'], $_POST['subject'], $_POST['body'], $headers); echo "Mail sent to ".$_POST['to'].". \n"; } ?>