background preloader

PHP File Upload

PHP File Upload

Uploading, Saving and Downloading Binary Data in a MySQL Database Uploading, Saving and Downloading Binary Data in a MySQL Database Pages: 1, 2, 3 Creating the upload scripts To make thing easier, I created an open_db.inc include file, so I don't have to keep using the same code to connect to a server and select the database. I'm a lazy programmer, and you should be one too! View contents of open_db.inc. This next script is used to upload a new file into the database. View contents of add.php. We are using the same script to handle both actions: uploading a new file and showing the form to add the information related to this new file. Okay, that seemed almost too easy, right? Next page: Creating the download scripts

php - how to pass array through hidden field Installing LAMP On Ubuntu For Newbies In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux. Install Apache To start off we will install Apache. 1. 2. sudo apt-get install apache2 3. Testing Apache To make sure everything installed correctly we will now test Apache to ensure it is working properly. 1. You should see a folder entitled apache2-default/. Install PHP In this part we will install PHP 5. Step 1. Step 2. sudo apt-get install php5 libapache2-mod-php5 Step 3. sudo /etc/init.d/apache2 restart Test PHP To ensure there are no issues with PHP let's give it a quick test run. Step 1. sudo gedit /var/www/testphp.php This will open up a file called phptest.php. Step 2. Step 3. Step 4. The page should look like this: Congrats you have now installed both Apache and PHP! Install MySQL To finish this guide up we will install MySQL. Step 1. Step 2 (optional). Step 3.

Install lamp with 1 command in Ubuntu 12.04, 12.10 Quantal Quetzal & LinuxMint13 Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform that uses Linux as operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language. We did show you in our previous post how to install LAMP in Ubuntu 10.04 with one command using tasksel command. It is a software installation application that is an integral part of the Debian installer and works under Ubuntu Linux too. It groups some packages by tasks and offers the user an easy way to install the packages for that task. It provides the same functionality as using conventional meta-packages. in Maverick this command dosn`t come by default, so we need to install it first before to perform the LAMP installation. This tutorial was has been tested on Ubuntu 10.04, 10.10, 11.04, 11.10, 12.04 LTS Precise Pangolin. Open terminal and Type the command :install it first with sudo apt-get install tasksel sudo tasksel

Related: