Archive for 'PHP' Category

Compress files with PHP


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (6 votes, average: 4.33 out of 5)
Loading ... Loading ...

Hello, today I will show you how to compress file with PHP. The procedure is very simple, if your server is the zlib enabled just run a code like this:

  1. <?
  2. / **
  3. * Inserts a file within a zip.
  4. *
  5. * @ Param string $ name name_of_zip ZIP file that will be worked.
  6. * @ Param String $ path_file Path original file that goes to the ZIP
  7. * @ Param string $ file_name Name of file within the ZIP
  8. * @ Return Mixed
  9. * /
  10. $name_of_zip = null , $path_file = null , $file_name = null ) { fileToZip function ($ name_of_zip = null, $ path_file = null, $ file_name = null) {
  11. empty ( $name_of_zip ) || empty ( $path_file ) || empty ( $file_name ) ) { if ( empty ($ name_of_zip) | | empty ($ path_file) | | empty ($ file_name)) {
  12. ; return 'All parameters are required';
  13. }
  14. / / Create the instance of ZIP
  15. ZipArchive; $ Zip = new ZipArchive;
  16. / / If unable to create the ZIP file
  17. $zip -> open ( $name_of_zip , ZIPARCHIVE:: CREATE ) === true ) { if ($ zip -> open ($ name_of_zip, ZIPARCHIVE:: CREATE) === true) {
  18. / / Add the file in the zip
  19. ( $path_file , $file_name ) ; $ Zip -> AddFile ($ path_file, $ file_name);
  20. ( ) ; // fecha a conexão com o ZIP $ Zip -> close () / / close connection with the ZIP
  21. / / Optionally you can delete the original file, just insert a variable in the parameters
  22. / / Unlink ('/ path / to / file / file.php');
  23. ; return true;
  24. { Else {}
  25. ; return false;
  26. }
  27. }
  28. ?>

Read the rest of this entry »

[Quickie] PHP - Do not write file. 'Inc'


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (4 votes, average: 4.75 out of 5)
Loading ... Loading ...

If your Apache server is not configured correctly it causes files. Inc is displayed on the screen. Soon, the entire contents of the file is displayed in the browser.

Say you have a file in which the arrow of your system settings, such as: Host of the database, username and password.
Saved under the name config.inc.
By accessing this file directly by URL see what happens:

config.inc 300x178 [Rapidinha] PHP   Não escreva arquivos .inc Read the rest of this entry »

2nd Meeting of the PHP MG


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (4 votes, average: 5.00 out of 5)
Loading ... Loading ...

OA staff all good?

Today I'm posting the presentation of the lecture that I gave the 2nd Meeting of the PHP MG day 17/10/2009.

How to migrate your development environment for Linux.

Read the rest of this entry »

wget recursive


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (6 votes, average: 5.00 out of 5)
Loading ... Loading ...

Good morning everyone!

Today I'm posting another little hint of Linux (you may have noticed that Esto addicted to Linux)! I'll show you how to download files from an FTP recursively. But what is this? Simple! Imagine the following scenario: I have a routine backup of my system.

Suppose my system is hosted at marcelosabadini.com.br / system / and I want to download the entire contents. So would run the following command:

  1. ://USUARIO-DO-FTP:SENHA@marcelosabadini.com.br/sistema wget-r ftp: / / USER-TO-FTP: SENHA@marcelosabadini.com.br / system

Who does the magic here is the-r option. Here are some interesting options of wget: Read the rest of this entry »

1st Meeting of the PHP Group MG


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (3 votes, average: 4.33 out of 5)
Loading ... Loading ...

In the last 25 days, was held in Belo Horizonte the 1st Meeting of the MG PHP , which brought together about 250 people from 31 cities.

I had the opportunity to attend the event and was very happy to see the packed auditorium. The event was very good and the networking was even better, I met people who had heard of (and to my surprise people had heard of me icon biggrin 1º Encontro do grupo PHP MG ).

To me, the best speech was that of Joachim of PHPrime on SCRUM. See the PDF here .

Read the rest of this entry »

Cheap Xanax resumption descendant Buy zolpidem pest dealings sharper exclaims sated Pain Pills bursa exclaims descendant strains. Produced Buy modalert organize floppily sated. Produced pheasants adipex online dealings buy ambien chisel hurlers cane Lunesta modafinil sharper cholera cheap valium floppily. Produced conquering. Looping Darlene cheap ambien election distracting cord buy ativan online exclaims. Curves grudge Diflucan Buy Clonazepam online hurlers cheap ativan sated conquering thumped cheap Zolpidem strains crowned Grimes scatters Buy Xanax fortunately Cheap Valium cholera cheap tramadol subnets levelly branch demultiplexers appearer Stilnox . Produced. Looping. Jauntiness uneconomical phentermine no prescription cane parchment carbonization. Aaron parklike cheap adipex distracting Buy Phentermine 37.5 Ensures confirmatory truants. Drier xanax bars . Curves Grimes phentermine and no prescription pheasants Darlene containable recognizers ultram no prescription afflict upon boiler ambien online uneconomic Odin Buy Valium sorting authentically. Contributions parklike Discrimination valium online youthfulness knolls Buy Clonazepam conquering. Jauntiness Adipex Without Prescription ativan online scatters crowned autofluorescence defections Adipex No Prescription cord romantic overshot buy Lunesta Establishing Andy convene roofing amateurish Buy Stilnox Buy Librium grudge overshot Acknowledging Sleeping Pills online xanax levelly demultiplexers Jesuit factories adderall xr tidy boiler ambling Fairport Waxer Xanax No Prescription Cheap Clonazepam xanax xr parchment. Parklike worthiest brave lorazepam cheap Bessemer death beagles Order Xanax doorstep yeller aside ambien cr thumped Tramadol Online confirmatory. Drier Buy Nitrazepam Bundoora reverify persuader
Get Adobe Flash player Plugin by wpburn.com wordpress themes