Does PHP have a tar like function? [duplicate] - php

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Build Tar file from directory in PHP without exec/passthru
Does PHP have a tar like function? So that I can create a tar file containing some dirs just created?

Archive_Tar will do this for you. You should know that this only makes a file that contains a lot of files; they aren't compressed at all. Consider compressing with gzip for text data or bzip for binary data.

Related

PHP a path beginning with / uses the root of the linux box it's hosted on. How to make / refer to the site root [duplicate]

This question already has answers here:
PHP get website root absolute URL in server?
(4 answers)
Closed 8 years ago.
This would make including files a lot easier. Is there anyway of doing this, for instance in a .htaccess file?
PHP will reference files from where the file is located are like you have stated, and PHP is typically not aware of the URL that it is working with. I would recommend using spl_autoloader (http://php.net/manual/en/function.spl-autoload.php) so that you only have to include one file and then spl_autoloader will include the rest of your classes.
Also look at:https://github.com/theseer/Autoload

Read .properties files using PHP [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Does PHP allow *.properties file as in Java?
How to read/parse .properties file using PHP?
.properties files are usually used in Java platform. Its counterpart in PHP is .ini files. .ini files can be parsed natively by PHP using parse_ini_file(). See this stackoverflow question: Does PHP allow *.properties file as in Java?.
Still, if you would like to read and parse .properties files, you have to do that manually. A quick search on Google take me to the following result:
reading java-style properties file in PHP - Github repository
Hope this helps :)

How do you open an MS Word file with php? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Create Word Document using PHP in Linux
I am trying to open Word files and edit them on linux based operating system.
is there any PHP API that enables me to open and edit word file?
I want to read and edit these files and view the images and the text formating.
We used COM objects to open up MATLAB using PHP on a Windows machine. We were able to control it pretty decently, pass scripts and such. You might want to take a look at that.

PHP unzip no external libraries [duplicate]

This question already has answers here:
Unzip a file with php
(12 answers)
Closed 5 years ago.
Is there a php function or class that does not require special libraries to be compiled with php in order to unzip a file.
I'm looking for something that processes the unzip and decompression entirely with php. It seems like all of them require some external extensions compiled with php. Correct me if I'm wrong.
This is something I've never seen before to be honest. Most hosts will actually install libraries such as zlib for you if you ask (if they're not already) so you can use the functionality

How can I modify exif data of an image with PHP [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How do I add exif data to an image?
I want to modify some information in exif data with PHP. I've googled around but no hope. There's function in PHP, exif_read_data. But it only reads not writes. Anybody knows how or walkaround?
Looks fairly old but may be something for you: http://pel.sourceforge.net/
This gets also mentioned in the linked article from Calvin L.
http://pel.sourceforge.net/
A php extension that can write exif data, with installation instructions using PEAR. It requires that you can control which extensions are being installed on the machine that runs your PHP, which is not the case in many virtual hosting environments.

Categories