Background With XML Parser, you use can only read XML. To write and otherwise manipulate an XML document, you can use PHP DOM Extension. DOM stands for Document Object Model and it is a way of expressing XML nodes as
How to use the Iterator interface in PHP
This article demonstrates how to use the Iterator interface in PHP. Objects implementing this interface works like an array when used in foreach constructs.
How to Zip a file or the contents of a Directory in PHP
Background This article demonstrates how to archive the contents of a directory in PHP using ZipArchive class. [wp_ad_camp_1] Software Requirements Windows 7 Professional SP1 PHP 5.5.9 / Zend Engine v2.5.0 NetBeans IDE 8.0.1 Zip a file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | /* * Copyright 2014 www.turreta.com. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Description of ZipArchiveSample * * @author www.turreta.com */ $zip1 = new ZipArchive(); $zip1->open("zip_add_single_file.zip", ZipArchive::CREATE); $zip1->addFile('zipme.txt', 'zipme.txt'); $zip1->close(); |
Zip a Directory
How to read files line by line in PHP
Background [wp_ad_camp_1] PHP is not as bad as other people would think. Sometimes it is easier to do things in PHP than in, say, Java. Consider reading a text file line by line and parsing each pipe-delimited line. Hardware Environment
How foreach Interacts with Iterator interface
How foreach Interacts with Iterator interface
Configure Netbeans to Debug PHP Web Applications
Figuring out how to configure NetBeans, xdebug, PHP, and Apache to enable debugging did not come by easily despite the myriad references available online. However, most (if not all) of them are outdated, and inaccurate. As a result, they tend to obscure a rather simple configuration or how-to.
WordPress Plugin And Composer
This post quickly shows the basic usage of WordPress Plugin and Composer. We are to use a PHP library within our own already existing WordPress Plugin. Composer We can use Composer with a WordPress plugin. The composer is a dependency