Set 08
Per attivare le estensioni OCI/Oracle per PHP in XAMPP eseguire il comando:
sudo /Applications/XAMPP/xamppfiles/xampp oci8
Verrà visualizzato:
Please enter the path to your Oracle or Instant Client installation:
[/Applications/XAMPP/xamppfiles/lib/instantclient-11.2.0.3.0]
installing symlinks...
patching php.ini...
OCI8 add-on activation likely successful.
LAMPP: Stopping Apache with SSL...
LAMPP: Starting Apache with SSL...
Adesso le estensioni sono attive.
Giu 17

A volte è utile non avere un controllo dell’HTML su Eclipse. Ecco come fare:
Eclipse -> Preferenze -> Validation
Personalizzato per ogni progetto:
Properties -> Validation
disabilita tutti i check che riguardano HTML.
Apr 11
There’s a bunch of ways to upgrade the preinstalled version of PHP 5.3.15 on Mac OSX Lion using Macports, brew, etc.., but to me, this was the most simplest. I took the info from http://www.coolestguyplanettech.com/upgrade-to-php-5-4-or-5-5-on-mac-osx-10-8-mountain-lion/
OSX 10.8 Mountain Lion ships with PHP version 5.3, there is an easy upgrade method to either the current stable PHP 5.4 or beta version 5.5.
The latest PHP version in this guide is from this PHP Packaged site which is being maintained for OSX and is known as a reliable source.
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
After it’s done, put the following in one of your PHP pages and check.
phpinfo()
In terminal, type the following:
php -v
If you are still getting the old version, it’s because the installation was done in a different directory and pointing to the old one. Type the following in terminal.
cd /usr/bin
rm php
ln -s /usr/local/php5/bin/php php
Now do a
php -v
Should be showing PHP 5.5.11.
Dic 06
I found out why in kepler don’t work fine (into some class) open a method or properties from another class with command CTRL + arrow “over” a class. I reinstall 1000 times PDT but nothing, the bug not fixed.
It’s sufficient look the source code of the class and update the code from “throw (new Exception(”));” to “throw new Exception(”);”, that is you must delete the “parentheses” before the word “new”. I don’t know why, but now kepler work fine.
bye
Giu 26
Illustrerò tre semplici script in php per scaricare facilmente delle immagini o file da un URL. Assicuratevi che la cartella dove state scrivendo (cioè dove downloadare le immagini) esista e abbia i permessi di scrittura per chiunque o per i processi web.
Per tutti e tre gli esempi supponiamo di scaricare un’immagine all’url “http://4rapiddev.com/wp-includes/images/logo.jpg” che metterla nella cartella “download” col nome “file“.
Primo metodo
file_get_contents-file_put_contents
<?php
function download_remote_file($file_url, $save_to)
{
$content = file_get_contents($file_url);
file_put_contents($save_to, $content);
}
?>
Leggi il resto di questo articolo »
Mar 13
Pochi giorni fa mi sono trovato ad avere la necessità di criptare il codice php di un’applicazione. Naturalmente l’utente che visita la pagina in php ha come risultato il codice html prodotto dal server, ma in particolari occasioni ci è davvere utile nascondere il codice php sorgente, soprattutto quando dobbiamo fare delle demo e non vogliamo che lo smanettone di turno si impossessi facilmente di array o funzioni.

Leggi il resto di questo articolo »
Ultimi Commenti