I m PHP 5.2.0 / Apache and I can’t access php.ini I try to update .htaccess and added php_value upload_max_filesize “25M” php_value post_max_size “25M” However it will give me “Internal Server Error”
Category Archives: Programming
Javascript confirm Yes/No
Use a javascript confirm box to ask the user if they want to delete
Mysql Select within Select (sel into sel)
SELECT clients.id, (SELECT Count(clients_job.id) FROM clients_job WHERE clients_job.client_id = clients.id ) AS JobCounter FROM clients ORDER BY EPONIMIA ASC
PHP regular expressions examples
A simple method of validating an IP address using PHP and regular expressions <? $string = “255.255.255.255”; if (preg_match( ‘/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/’, $string)) { echo “IP address is good.”; } ?>
PHP mysqli::set_charset
In connection file add the following lines $mysqli = new mysqli($hostname_###,$username_###,$password_###,$database_###); $mysqli->query(“SET NAMES ‘utf8′”);
install PEAR to PLESK over UBUNDU
#apt-get install lynx #lynx -source http://pear.php.net/go-pear | php press 1 and change the path to /usr/share