How to unzip a zip file using php
Nov 26, 2009 Php
Very exciteing and challenging work!.You are thinking that what is exciteing and challenging in this work but i am talking about how to unzip a zip file using php.
Some times programmer has the requirment to select a zip file and unzip all the files and folder at a particular location and then delete that zip file.
I faced this problem first time when i was making a file manager in php . That was not just a file manger but also a full featured ftp client.I tried to search on Read the rest of this entry »
google but not found anything .finally i got a small help from google and than i made a good function for you all to unzip a zip file.
Tags: chmod, create directory, delete zip, directory permission, directory structure, folder permission, ftp, linux, mkdir, overwrite, Php, server, subdirectory, unzip, windows, zip, zip_open
how to download a file without display download request
Usually when we try to download something from a server we get a confirmation request whether you want to save the file or open it.
To avoid this request you can use the below code and then user can directly download that file without any message.
First give a link or a button for user to download and when they click redirect them to a file which will have the code below.
suppose you want user to download a pdf file then first make a link like this:
<a href=”javascript:void();” onClick=”location.href=’doc/document_download.php’”>download pdf</a>
Tags: attachment, Content type, Content-Disposition, direct download, download, file, filename, pdf download, Php
How to run code of php5 on a server with php4 using htaccess
Nov 26, 2009 Beginners, Experts, Php
This is big question for beginners every time.Now as we know that php5 is in full flow but still there are lot of servers out there with php4 and if you upload your php5 code on those servers then it will be mess.May be your site will not run or any part or your will go down.But don’t worry friends , there are only 2 lines to put this problem far from you.
Just put these 2 lines below in a htaccess file and put that htaccess at the root directory.
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
Now all the modules either they have written in php4 or php5 will work very well.
.htaccess file at godaddy
Nov 23, 2009 Php
Godaddy a big name in the world of internet and web hosting. There are thousand of websites hosted on godaddy.com. Lot of programmers have faced godaddy, may be they are experienced or fresher. In today’s programming world htaccess is a comman name but its always an advanced topic specially for beginners. As search engine markting is growing everyday , the use of htaccess is also growing . But there is difference between godaddy’s htaccess and other htaccess , not very much but that is important to know for everybody.If you are not familiar with the rules of godaddy’s htaccess then it will make headache for you. Read the rest of this entry »
Tags: .htaccess, 644, Apache, ASCII mode, extension, godaddy, godaddy server, mod_rewrite, permission, php4, php5, rewrite rule, rewrite rules, search engine markting, search engine optimization, server
Latest news in php – What is new in PHP 5.3
Nov 20, 2009 Php
This release of PHP 5.3 is a major improvement in the 5.X series, which includes a large number of new features and bug fixes.
The key features of PHP 5.3.0 include:
* Support for namespaces
* Late static binding
* Lambda Functions and Closures
* Syntax additions: NOWDOC, ternary short cut “?:” and jump label (limited goto), __callStatic()
* Under the hood performance improvements
* Optional garbage collection for cyclic references
* Optional mysqlnd PHP native replacement for libmysql
* Improved Windows support including VC9 and experimental X64 binaries as well as portability to other supported platforms
Tags: bug fixes, Class Constants, features, function, improvement, latest development, Latest news, Letest Announcement, migration, Mysql, Namespace Aliases, namespaces, Php, PHP 5.3, static binding, use Keyword