In connection file add the following lines $mysqli = new mysqli($hostname_###,$username_###,$password_###,$database_###); $mysqli->query(“SET NAMES ‘utf8′”);
Tag Archives: PHP
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
Short If Statement in PHP
PHP – One Line If Statement – Short If Statement – Condensed If Statement I always have to look this up, so here it is for easy reference. Sometimes is makes the code look less cluttered if you can express and if in one line. The one line if statement is also known as the ternary …
php Flushing output
Flushing output void flush ( void ) There is a special function in PHP called flush(), which is not really related to output buffering because it works with standard output, however it is so very similar to what we’ve just been looking at that it makes sense to cover it here. Flush() sends all output out immediately, without …
How to enable or use .htaccess on Apache Web Servers in Windows:
Using a text editor, open the httpd.conf file. In XAMPP, this file is found in the \apache\conf directory Locate the following line of code: #LoadModule rewrite_module modules/mod_rewrite.so Remove the # from the line as seen below to enable the module: LoadModule rewrite_module modules/mod_rewrite.so Save the httpd.conf file and Restart your server Restart your Apache Server If all goes well, you should …
Continue reading “How to enable or use .htaccess on Apache Web Servers in Windows:”
PHP script random images From a folder
Add a php file with filename imageheader.php And Final <div id=”main_header” style=”background-image:url(imagesheader.php);”></div>