PHP Basic

PHP Basic

PHP memory limit sometimes makes it problem to upload. please check way to increase your memory limit. Way 1:  Modify php.ini Search “memory_limit” in your php.ini, and change the value of it. If no “memory_limit” found, add the following line at the end of php.ini memory_limit = 2568M ; Save file. And restart Apache. Way
Read More

Memcache module provides handy procedural and object oriented interface to memcached, highly effective caching daemon, which was especially designed to decrease database load in dynamic web applications. The Memcache module also provides a session handler (memcache). Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up
Read More

Very simple <?php // Turn off all error reporting error_reporting(0); ?> Other interesting options for that function: <?php // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE); // Reporting E_NOTICE can be good too (to report uninitialized // variables or catch variable name misspellings …) error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Report
Read More

<?php $directory = “folder_name/”;       // Folder name of  images //get all image files with a .jpg extension. $images = glob($directory . “*.jpg”); $i= 1; foreach ($images as $fileinfo) { $fromImg = “D:/xampp/htdocs/imagesize/”.$fileinfo; // Read  all images of you directroy $imageName = “gallery”.$i.”.jpg”;  // Rename your own way $toImg = “D:/xampp/htdocs/imagesize/rename/”.$imageName; //Rename images location copy($fromImg,$toImg); $i++;
Read More