{less}

html, javascript, php, web No Comments »

 

PHP template systems

php, web No Comments »

Some Savant3 examples here

Easy replace php short open tags with long php open tags

linux, php No Comments »
#!/bin/sh

#!/bin/sh
# Written by Marius van Witzenburg <info@mariusvw.com>
 
path="."
if [ ! -z "$1" ] && [ -d "$1" ]
then
    path="$1"
elif [ ! -z "$1" ]
then
    echo "Invalid path defined, using default."
fi
 
echo "Searching for php short open tags…"
echo "Starting path: $path"
find $path -name '*.php' -type f -exec perl -i -wpe 's/<\?=/<\?php echo /g' '{}' \;
find $path -name '*.php' -type f -exec perl -i -wpe 's/<\?/<\?php/g' '{}' \;
find $path -name '*.php' -type f -exec perl -i -wpe 's/<\?phpphp/<\?php/g' '{}' \;
find $path -name '*.ctp' -type f -exec perl -i -wpe 's/<\?=/<\?php echo /g' '{}' \;
find $path -name '*.ctp' -type f -exec perl -i -wpe 's/<\?/<\?php/g' '{}' \;
find $path -name '*.ctp' -type f -exec perl -i -wpe 's/<\?phpphp/<\?php/g' '{}' \;
find $path -name '*.inc' -type f -exec perl -i -wpe 's/<\?=/<\?php echo /g' '{}' \;
find $path -name '*.inc' -type f -exec perl -i -wpe 's/<\?/<\?php/g' '{}' \;
find $path -name '*.inc' -type f -exec perl -i -wpe 's/<\?phpphp/<\?php/g' '{}' \;
find $path -name '*.thtml' -type f -exec perl -i -wpe 's/<\?=/<\?php echo /g' '{}' \;
find $path -name '*.thtml' -type f -exec perl -i -wpe 's/<\?/<\?php/g' '{}' \;
find $path -name '*.thtml' -type f -exec perl -i -wpe 's/<\?phpphp/<\?php/g' '{}' \;
 
echo 'Done!'

http://mariusvw.com/2010/03/03/easy-replace-php-short-open-tags-with-long-php-open-tags/

PHP command line syntax check

linux, php No Comments »
php -l file.php

Check all PHP files in the current directory

for i in *.php; do php -l $i; done

Check all PHP files in the current directory and all subdirectories

find . -name \*.php -exec php -l "{}" \;

find

linux, php No Comments »

Find word in php files

find . -iname '*php' | xargs grep 'find_what' -sl

Find php short tags in php files

find . -name '*.php' -exec grep -H "<?[^pPxX]" {} \;

Adminer

blogroll, mysql, php No Comments »

Adminer

Adminer (formerly phpMinAdmin) is a full-featured MySQL management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server

WinBinder

blogroll, php No Comments »

WinbinderWinBinder is a new open source extension for PHP, the script programming language. It allows PHP programmers to easily build native Windows applications.

Get visitors IP

php No Comments »
    $ip = $_SERVER['REMOTE_ADDR'];

mysql_insert_id

blogroll, mysql, php No Comments »
       mysql_insert_id()

http://php.net/manual/en/function.mysql-insert-id.php

mysql_affected_rows

blogroll, mysql, php No Comments »
       mysql_affected_rows()

http://php.net/manual/en/function.mysql-affected-rows.php

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in