Advanced Search
Search Results
26 total results found
Content Management Systems
Content Management Systems (CMS) are web programs that make it easier to add and update content on web sites. Instead of learning HTML, FTP and web server commands, once a CMS is set up and a template “look” is defined, others can usually add material very eas...
PHP
PHP eXtremePHP and http://pear.php.net/ These code bases will be useful in rolling the PHP out more quickly – Jose A higher level PHP web application framework is the Horde framework http://www.horde.org/ – Jose http://www.phpoki.org/ CakePHP Zend Sy...
RSS (Really Simple Syndication)
As of 2006, UCLA.edu has a RSS Feeds & Podcast Directory to promote and encourage syndication.What is RSS?RSS is a free, simplified format for syndicating news and content. RSS feeds are utilized by many major news sites like CNN and Yahoo! through to the ...
PHP Commenting Style
Any programmer can tell you that good commenting in your source code is an integral part of programming. Whether the language you’re dealing with is an interpreted language like Javascript or compiled like C++, good comments lead to better readability and bet...
Create a PHP unit test case using SimpleTest
You can download SimpleTest at https://sourceforge.net/projects/simpletest/Suppose you have a PHP file called math.php that contains functions that you want to test.<?function square($x) { return $x * $x;}function cube($x) { return $x * $x * $x;}?>Then y...
What kind of test can SimpleTest do?
SimpleTest’s unit tester is designed to test PHP code. Also its web browser component (think of it as a fake browser from the POV of a web server) can be used to test web pages.
The advantages of Javascript
IntroductionJavascript is a browser-interpreted language that was created to access all elements of HTML and the browser. The processing is done entirely by the client-side browser which makes it very useful tool to handle processing which would have otherwis...
PHPXref vs PHPDocumentor
IntroductionThere exists a wide array of PHP documentation tools on the web available free for download. Two of the most popular ones are PHPXref and PHPDocumentor. Here, I outline the differences between the two to help you decide which one you should use.T...
PHP error reporting
Error levels name value description example 1 example 2 E_ERROR 1 Fatal run-time errors notdefined(); E_WARNING 2 Run-time warnings 1 / 0; E_PARSE 4 Compile-time parse errors +-; E_eval(‘+-;’); E_NOTICE 8 Run-time notic...
Using SSL socket in PHP under Windows
ProblemIf you try to open a socket (fsockopen, pfsockopen) with SSL in PHP 4.x under Windows, the operation might fail with the following message: Warning: fsockopen(): no SSL support in this buildThis problem occurs even if phpinfo() shows openssl as loaded ...
What are the differences between addslashes(), mysql_escape_string() and mysql_real_escape_string()
addslashes() escapes single quote (’), double quote ("), backslash (\) and NUL (\x00).mysql_escape_string() and mysql_real_escape_string() escapes the characters above plus: CR (\r), LF (\n) and EOF (\x1a). Apparently (according to the manual), MySQL wants the...
Passing command-line arguments into PHP
Say you have a PHP script and you want to pass command-line arguments into the script, e.g. calling the script like this:php script.php datafile.txt 10 100PHP stores all command-line arguments in an array:$argv 0 => “script.php”$argv 1 => “datafile.txt”$...
How do I use cURL in PHP on Windows?
To configure cURL to be able to run in PHP uncomment this line (remove the semi-colon) in the php.ini file: ;extension=php_curl.dllApparently in UNIX systems Apache will read cURL’s curl-ca-bundle.crt file at startup and cURL will be able to use that informat...
Configuring PEAR on Windows
PEAR is the PHP Extension and Application Repository. Applications written in PHP often include references to external libraries and PEAR is a way to manage these. On Windows if PEAR hasn’t already been configured log in to the server and run go-pear.bat in th...
Speed of unpack() in PHP
I needed to extract a list of integers from a binary string. I was curious to know if PHP’s unpack function is fast compared to a custom function, so I wrote a test for it.<?php$filename = '<some large file>';$unpack_time = 0.0;$unpack_time2 = 0.0;$un...
Manual setting of filename and type in a dynamically-generated web page
Problem: Suppose you have a CGI script (PHP or otherwise), say genimage.cgi, that generates an image and sends it to the browser. If the user visits the URL of the script and tries to save the generated image, the browser might suggest “genimage.cgi” as the de...
Using LimeSurvey as a Survey Tool
We were in search of a good survey tool, and after some research came upon LimeSurvey (www.limesurvey.org). We found it extremely easy to set up and use and allowed for professional surveys with features commonly found in commercial products.The following lis...
Create PDF on the Fly<img src='http://ram.genetics.ucla.edu/j00/a.png'>
My goal is to create PDF on the fly using PHP. I use php to query the database, the result from the database will be listed in a table, and this view need to be output as a pdf file.The requirements are 1) it needs to run on sun solaris. 2) need to write dyn...