Questions for php


Rewriting urls with mod_rewrite - GET variables

I found out I could make clean urls with mod_rewrite. I managed to make pages like /home.php viewable by visiting /home (without .php).

How to figure out where this database insertion and retrieval is breaking?

Problem solved...variable undefined. I will add full answer when stackoverflow allows me to answer own question

How to use an XML string to find certain element values in php?

How to use an XML string to find its certain element values?

Compress and download from 3rd party ftp server using php

I'm downloading files from 3rd party ftp server using php. But file is more then 15mb. So it took more time to download. I have an idea to compress and download on the fly from ftp server. Is it po...

defining an initial variable in a new object in php

I am new to OOP so forgive me if my question is flawed.

Files showing up in terminal run, not in browser

I'm trying to list the files in a directory, but only the HTML portion of the page shows up in my browser. When I run the page through the PHP terminal interpreter, all the files are listed with the

How to create a custom drupal cms from starting

Actually i need to know how and where the page content for each drupal page comes. So i tried to integrate my own custom theme to drupal. In the tutorial they are saying like i need to create a cus...

Problems iterating PersistentCollection

I'm new to Doctrine and I'm having an issue iterating over a PersistentCollection, I have some basic entities set up with a ManyToMany relationship:

splitting multi-line email address entries

I'm having problems with splitting an array correctly. I have a textarea input that allows for multiple email addresses to be entered one per line. Once entered I'm turning this into an array and ...

decoding Timestamps explicitly encoded in a filename

Quite a while ago I decided to change the way filenames are formatted when users upload a file to my website(which was a great idea!) to include the UNIX_Timestamp in the filename, this proved very

Text formatting doesn't appear in emails that have been formatted using TinyMCE and sent using SwiftMailer

I use SwiftMailer in my PHP scripts to send emails and I use TinyMCE as a text editor to write and format the message body. The problem is that when I send the message it appears without any format...

PNG Transparency with PHP

Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing:

Dynamically populate two dropdown menus

I'm not (as I am certain you'll notice below) a programmer or coder. I write network documentation manuals.

How to refactor PHP to help improve SQL Server speed?

I've been tasked with finding a solution to some performance issues we've been having with our PHP web application (basically, we're reaching a "failure" point when combining high-volume users with...

Why does array_unique sort the values?

This refers to one of my previous questions: array_unique vs array_flip - This states that array_flip(array_flip()) is much quicker than array_unique() when dealing with simple strings and integers.

UTC clock based on server time?

I have a JavaScript clock that gets the time in UTC, it currently works, but the time is based off the client's computer. What could I do to base the time off of the server instead? I am using PHP ...

Symfony2 efficient displaying list of categories and related products

I've got object Category and Product relation (one-to-many). I want to display list of all categories and objects related to them. If I use:

Only allow English characters/letters/numbers and a few special characters

My problem is that I am making a small search engine from scratch, but it gets messed up if I search in Russian/any other language besides English. I was hoping some one could give me a code with r...

Add values to an array after isset()

I'm trying to add elements to an array after subsequent trials, but so far only one value is being added to the array. I've Googled and searched stackoverflow, and I seem to be getting only half the

Zend Framework Database Transaction - Can't rollback

Alright, let me get this out of the way first. My question is similar to this:

How can an HTML page extract parameters passed through a form?

My question is should I convert two html pages to php pages, so the called page can access its POSTed parameters, or is there a way for a called html (.html extension) page to access posted paramet...

Trouble with $.post

I am trying to insert some values into an sql database.

In PHP, how do I check if a function exists?

How can I check if the function my_function already exists in PHP?

Alternative Web file explorer/Navigator

I've found this online file explorer called enCode eXplorer. It was just what I was looking for; a simple, clean, free, easy-to-edit system, completely made up of one php file. The only problem I h...

What is the difference between CURLOPT_SSLKEY and CURLOPT_SSH_PRIVATE_KEYFILE?

I was looking at this question and, to try to find the mistake, went to the PHP manual where I seen those 2 options :

Get itunes id from url

what is the best way to retrieve id from itunes app link?

extract some html with preg_match

i use preg_mach for extract some html ( i try to use DOMDocument but i had some problem with new line )

Drupal overriding existing option list values

Currently entityreference do not support filtering (via views like references). I have to filter the returned result of option lists manually via hook_form_alter.

MySQL- Unable to jump to row 0 on MySQL result index

I have got an old site that has recently been displaying an error which is weird as its been untouched for some time. I get the following:

for loop with assignment in php

When I want to iterate an array I usually do:

now(); and date(); function in code igniter give zeros result

So i want to insert current time to mysql database, this is my code :

Show cumulative totals in new column

I am working on a simple flow statement where the user inputs +ve and -ve values and they are stored in a single table.

Translating a Perl reference to OO PHP?

So I tripped across another oddity in translating the old developers Perl script into

Regular Expression only allow alphanumeric plus other specific characters

With a PHP function I'm trying to create a RegEx string for preg_replace that will only allow alphanumeric characters plus ! @ # $ % & . ,

TCPDF not formatting

I'm using an ajax call to print a pdf and email it to user, but the problem is that the data in the pdf is not formatted.

php - simpledb - can't get consistent read to work

I'm using AWS SimpleDB for my site, however if I udpate an attribute with something completely different, searching that property with either the new value or the old value are both returning the s...

How to replace “{* foo *}” with nothing?

I want to replace all text what start with "{" and end with "}" including those "{" and "}". Text between them may be anything. =(

How to do autorendering in Symfony

I'm guessing its just not done since I can't find any reference to this anywhere, even people asking without response. Although I'm hoping Symfony calls it something else.

Get request host in PHP

I'm developing a website by Zend.

How to ‘convert’ any given regex to a PHP `preg_match`-compatible regex?

Okay, this may be a dumb question, but I’m pretty new to regular expressions and I honestly have no idea how to do this.

Regular Expression: Why am I getting matches here when I expect none?

I've a regular expression that's looking for 2-3 upper case letters, together, ending in T and beginning with P, M, C or E. The regular expression, executed in PHP, looks like this:

Correct input values of strtotime

I want to convert a date by the following statement

error while loading wordpress post using ID

I am trying to retrieve the content of a wordpress post using its ID:

How to get data from multidimensional array by ommiting one column?

I am storing info in an array in a loop like that:

Converting a querystring into an associative array

In PHP, I need a function to convert a querystring from an URL, say: into a PHP associative array : array ['key1' => 'value1', 'key2' => 'value2...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.