I've created a language pack for a site before, but I'm not sure if what I'm doing is the best method.
Basically, all I have is a file with variables defining string constants. Usually a set of arrays where an array usually refers to a particular elements of the site.
Then the site code just includes the appropriate file based on a fl...
I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality.
I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do both have? Any other parsers you've used?
...
Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object?
I know that I can:
$file = fopen('c:\file.doc', 'w+');
fwrite($file, $text);
fclose();
but Word will read it as an HTML file not a native .doc file.
...
I am on a committee that would benefit from an online application that allows the members to collaborate w/ members.
I would want the ability to post messages and upload documents.
Is there any free, easy to install on your server apps that you would suggest?
...
I'm thinking about releasing some of my PHP work as open source using one of the popular open-source licenses out there. I'd like to build a community around it and let contributors other than myself help grow the codebase.
For someone who has never released anything as open source before, what are some important things to consider when...
I am working on a project that resizes images using PHP's GD library. I would like to be able to add the option to use seam carving to resize images but don't want to require something like ImageMagick (which can do seam carving with its liquid rescale feature) to accomplish this.
Since there are no built-in seam carving functions in GD...
I need to dynamically construct an XPath query for an element attribute, where the attribute value is provided by the user. I'm unsure how to go about cleaning or sanitizing this value to prevent the XPath equivalent of a SQL injection attack. For example (in PHP):
<?php
function xPathQuery($attr) {
$xml = simplexml_load_file('exa...
IIS is literally sending <?php ... ?> code to the browser rather then executing it.
But, only for the root http://domain.com/index.php file.
All other .php files in that folder and index.php files in subfolders execute as expected.
How can I get my root index.php code to execute?
Update: "index.php" is a Default Document of my Web...
I am interested in hearing which conferences you have attended that you feel covers the right material for a person who designs and develops websites?
just in case you need to know what i design/develop in: html/css, php, mysql.
I work in higher ed and administration is more in tune w/ sending their employees to higher ed conferences, ...
I moved a WordPress installation to a new folder on a Windows/IIS server. I'm setting up 301 redirects in PHP, but it doesn't seem to be working. My post URL's have the following format:
http:://www.example.com/OLD_FOLDER/index.php/post-title/
I can't figure out how to grab the /post-title/ part of the URL.
$_SERVER["REQUEST_URI"] - ...
Hi all, I'm a Java developer and I have a question about automating a task I've been given. I'm having to 3 times daily, login to this website we have at work, select a few form elements and then click on submit to get a report printed out. I'm wondering how I can write some sort of script that will automate this task? Where should I sta...
Here's my situation - I want to create a resized jpeg image from a user uploaded image, and then send it to S3 for storage, but am looking to avoid writing the resized jpeg to the disk and then reloading it for the S3 request.
Is there a way to do this completely in memory, with the image data jpeg formatted, saved in a variable?
Thank...
I am looking for a way to take a user uploaded image that is currently put in a temporary location ex: /tmp/jkhjkh78 and create a php image from it, autodetecting the format.
Is there a more clever way to do this than a bunch of try/catching with imagefromjpeg, imagefrompng, etc?
...
I'm trying to write an interface between a home-grown project management system and Serena Mariner. (The bigwigs like to read Mariner, the worker bees like to write to the home grown system.)
How can I (programmatically?) figure out what Attribute Keys are available?
I'm actually writing the interface in PHP, but any advice would be m...
I'm trying to call a php webservice using WCF. I googled some public php services to see if I could replicate the error I was receiving and I created 2 different unit tests to demonstrate.
The test that failed I get the following error:
System.ServiceModel.ProtocolException: The content type text/xml; charset=ISO-8859-1 of the response...
For ActionScript 2, I've used NaturalDocs. However it has pretty poor support for PHP. I've looked so far at Doxygen and phpDocumentor, but their output is pretty ugly in my opinion. Does anyone have any experience with automatic documentation generation for PHP? I'd prefer to be able to use javadoc-style tags, they are short to write an...
I have an odd problem...I'm using a documentation generator which generates a lot of output like docs/foo.php.html. It's XHTML, and thus contains <?xml...> tags at the beginning of file. The problem is, Apache has somehow decided to run it through the PHP interpreter, even though ".php" appears in the middle of the filename, and not at t...
is there an if statement when it comes to mysql query statements?
when i am updating a table record, i want to only update certain columns if they have a value to be updated.
for example, i want an update table function, and there is a table for volunteers and a table for people who just want email updates.
i want to use the same func...
An idiom commonly used in OO languages like Python and Ruby is instantiating an object and chaining methods that return a reference to the object itself, such as:
s = User.new.login.get_db_data.get_session_data
In PHP, it is possible to replicate this behavior like so:
$u = new User();
$s = $u->login()->get_db_data()->get_session_dat...
I am having trouble grabbing the values from the form once processed. I need your help.
function updateUser($table, $id) {
if($_POST) {
processUpdate($table, $id);
} else {
updateForm($table, $id);
}
}
function processUpdate($table, $id) {
print $table; //testing
print $id; //testing
$email=addslashe...