<?php $hostname_logon = “localhost” ; $database_logon = “” ; $username_logon = “” ; $password_logon = “” ; $connections = mysql_connect($hostname_logon, $username_logon, $password_logon) or die ( “Unabale to connect to the database” ); mysql_select_db($database_logon) or die ( “Unable to select database!” );
Tag Archives: PHP
phpThumb()
phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD …
PHP pseudo-cron
Pseudo-cron uses a syntax very much like the Unix cron’s one. For an overview of the syntax used, see a page of the UNIXGEEKS. The syntax pseudo-cron uses is different from the one described on that page in the following points:
filezilla binary mode
Set Transfer type (menu Transfer) from Auto to Binary and upload your script.
Install mcrypt
If using a Debian-based Linux system, you can run the following commands: sudo apt-get install php5-mcrypt sudo /etc/init.d/apache2 restart
PHP Word Wrap
string chunk_split ( string $body [, int $chunklen = 76 [, string $end = “\r\n” ]] ) < ?php // format $data using RFC 2045 semantics $new_string = chunk_split(base64_encode($data)); ?>