What is a Community of Practise?
A community of practice (CoP) is an most often and informal, gathering where the participants come together to learn and support each other. Professional institutes may contain CoPs - mostly in the form special interest groups (SIGs). There can also be software user groups.
Community of practise model
Purpose: Engage actors in communities that learn
Music Browser is 'a light-weight web-based browser and streamer for you music collection.' It requires a web server with at least PHP4.2+ and 200mhz CPU with 32MB of RAM.
It might be interesting to try this on WOS.
Creating and deleting directories
Script showing how to create/delete directory
Migrated forum post
Script showing how to create/delete dirs.
Code:
This creates a directory that has a mode of 777.
Code:
<?php
if ($makedir == "MakeDir") {
$newdir = "$dirname";
$dirmake = mkdir("$newdir", 0777);
print "<a href="$newdir">View New Directory</a>n";
}
?>
<form action="<? $PHP_SELF; ?>">
<input type="text" name="dirname">
<input type="submit" name="makedir" value="MakeDir">
</form>Deleting a file
Simple file delete example using a form
Migrated forum post
I received an email about deleting a file and I'm posting part of my reply here. I may expand it to be a full tutorial.
The unlink() function deletes files in PHP. http://www.php.net/manual/en/function.unlink.php
You should have read/write privileges to the directory that you're going to be deleting from (chmod 777)
This is a simple example of using a form to delete a file.
Code:
<?php
if ($submit && $deleteimage) {
function Delete_Photo($name){
$delete = unlink($name);
The Regex Coach
Content formatting with Regexes
The Regex Coach a graphical application for Linux and Windows which can be used to experiment with (Perl-compatible) regular expressions interactively.
PHP On-The-Fly! by Dennis Pallett
Introduction PHP can be used for a lot of different things, and is one of the most powerful scripting languages available on the web. Not to mention it's extremely cheap and widely used. However, one thing that PHP is lacking, and in fact most scripting languages are, is a way to update pages in real-time, without having to reload a page or submit a form.
Design an Online Chat Room with PHP and MySQL by Rory Canyon
In this article, you will learn how to design and develop a simple online chat room with PHP and MySQL. This tutorial explains every steps of the development, including both database design and PHP programming. Basic computer skills and knowledge of HTML and PHP are required. Ok, let's begin now.
Step 1: Design Database Table.
Create table "chat" in MySQL database to store basic chat information: chtime (chat time), nick (user nickname) and words (chat message, less than 150 characters)
mysql> CREATE TABLE chat
Fetching and saving the contents of a remote file
Submit a query to a search engine and save the results to a local file
1. Create a form that submits a query to a search engine.
2. Script should automatically save the query results to a file. Each query should be saved to separate files.
Figuring out the url of the remote file/search engine that you will submit your query to:
Using fgetscsv function
Reading the data saved in CSV file format
fgetcsv -- Gets line from file pointer and parse for CSV fields
Fgetcsv() example - Read and print entire contents of a CSV file
The field delimiter is assumed to be a comma, unless you specify another delimiter with the optional third parameter.
PHP Code
<?php
$fp = fopen('csvfile.txt','r');
while($line = fgetcsv($fp,'1024',',')){
echo "";
print_r($line);
echo "";
/*
foreach($line as $value){
echo "$value