How To Install Nginx+PHP-FPM+PHPMyAdmin on CentOS 6

Posted on Jan 27, 2014
Hey Everybody. This is a tutorial that teaches the Nginx+PHP-FPM+PHPMyAdmin installation.

Step 1 - Install the Required Repositories

1. EPEL:

This command will download the package into your home directory:
rpm -ivh epel-release*

Your installation now is aware of the EPEL repositories. Check this by typing:
yum repolist

Text Downloadable Files with PHP

Posted on Jun 28, 2013
I needed to create a file which had to be downloaded. The file had to be in plain text and contents from file come from database. Because I didn't had a separate folder for each user I couldn't write the information to a file to the server and put a link in order the user to download it. I even try to other formats like .xls, .doc, .csv and it works really nice.

Code for downloadable file:
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"your_file.txt\"");
echo 'Text for downloadable file';  

FTP Upload with PHP for Beginners

Posted on Jun 27, 2013
To upload a file to ftp you need a html form where you can insert the ftp details, like the ones described above:

server - is the server on which he wanna upload the file.
username - is the user for which he makes the connection to ftp server.
password - is the user password for ftp username.
path to server - is the path on the ftp server which he wanna upload his file.
user file - is the file of the you wanna upload to ftp server.

© Twiwoo 2023 Cookie Policy