Hello guys, I often check StackOverflow and help me so much usually :) so i guessed why don't ask for help on this one ?
I'm using PHP on a web-based application and i need to use Apache FOP to generate a PDF from a pre-formatted FO file. ATM I'm using the command line exec('fop...') for this purpose, but i have several troubles when ch...
Hi there I have some code to resize an image w/ GD and Perl
sub adjust_size {
my ($localfile, $ext) = @_;
# need to use truecolor option to support 24 bit colors
$image = GD::Image->trueColor(1);
$image = new GD::Image->new($localfile);
my ($w, $h) = $image->getBounds();
...
everything works properly with RGB ...
In Perl/PHP regex is's possible to match a sequence and get an array with matched sequences:
preg_match('/20[0-1][0-9]/', $inputstring, $array_return); // PHP
I can't figure out how to do this in Java. match.group() returns the whole string.
Is this impossible?
...
$query = "SELECT users FROM tabl ORDER BY RAND()";
$result = mysql_query ($query)
or die ("Query '$query' failed with error message: \"" . mysql_error () . '"');
while ($row = mysql_fetch_array($result)) {
$users[] = $row[0];
}
$current = end($users);
$partners = array();
foreach ($users as $user)
{
$partners[$user] = $...
I'm developing a Zend Framework based application and I found myself writing a skeleton for the API module. I read a bit on the web and I started writing the skeleton based on Zend_Rest_Controller. Turned out ok, key login required to use the API.
The questions started when a colleague of mine started implementing the skeleton in a prop...
I need to replace the front end portion of our site with PHP that uses some Ajax calls, but the backend uses Django for db calls. I'm hesitant about using PHP and Django together, so I was wondering if anyone has experience doing so? Anything I should be aware of when integrating the two, for instance, urls that are mapped in the appli...
Hello,
I have page for which I want to load different content for different browsers.
Example :
IF Internet explorer
{include file="/content1.tpl"}
ELSE if any other browser
{include file="/content2.tpl"}
{/if}
Content1.tpl & Content 2.tpl are two different files having their respected Html & CSS.
How can I achieve this usi...
If I have a class (e.g Database) can I check the location of the script that tried to instantiate this class.
An example:
I have an example dir structure like so:
lib
Database.class.php
app
action.class.php
and in action.class.php:
$db = new Database;
and in Database.class.php
function __construct(){
$name = //some code to f...
The value of a local variable of a function has to be retained over multiple calls to the function. How should that variable be declared in PHP?
...
If I want myFunction to take $myVariable and assign to it an instance of SomeClass, I know I can do this:
class SomeClass { }
function myFunction(&$myVariable) {
$myVariable = new SomeClass();
}
myFunction($myVariable);
var_dump($myVariable);
However, I would like to be able to have myFunction operate like this:
class SomeClas...
i am trying to get a php cli script to go through a folder, get the id3 tags, which are in utf8 in cyrillic and but it in the database. when i execute the script i get the raw utf in the DB fields like "Àëáåíà"
here is the script
<?
set_time_limit(0);
include('classes/adodb5/adodb.inc.php');
include ('cla...
If, for example, I had array like this:
array(34) {
["ahostel.lt/img/background.png"]=>
array(4) {
["name"]=>
string(29) "ahostel.lt/img/background.png"
["time"]=>
int(1277819688)
["size"]=>
int(36811)
["hash"]=>
string(32) "2600e98e10aba543fb2637b701dec4f3"
}
["ahostel.lt/img/body-navigation-bg.p...
Possible Duplicate:
+ operator for array in PHP?
if $a and $b are bothe arrays the what would be the result of $a+$b?
...
hi
I'm use"PHP OpenID" for login with Google accounts into my site(forum and wiki) but when i send my profile address and i signed in bellow error are shown:
OpenID authentication failed: Nonce already used or out of range
1.where is the problem and how can i fix it?
2.how can get picture and another information's from a Google profi...
Hi,
Is there any function that I can use to parse any string to ensure it won't cause xml parsing problems? I have a php script outputting a xml file with content obtained from forms.
The thing is, apart from the usual string checks from a php form, some of the user text causes xml parsing errors. I'm facing this "’" in particula...
I'm working on an admin section right now to schedule employees for their shifts. It is simple in that on any day, employees work either the day or the night shift. How would you go about doing this so that it is easy to display? I was thinking I have a table with the employee names going down the first column. Then, the next 7 colum...
Excerpt from http://php.about.com/od/advancedphp/ss/php_sessions.htm:
So how will it know it's me? Most sessions set a cookie on your computer to uses as a key... it will look something like this: 350401be75bbb0fafd3d912a1a1d5e54.
My question is, in PHP, how to generate a key (e.g., 350401be75bbb0fafd3d912a1a1d5e54) for a session c...
Hi.
It might sound complicated, but it's not.
I have a table called "orders", with fields:
id INT(11) auto_increment,
realid INT(14)
Now, I want at every insert into this table, do something like:
INSERT INTO orders VALUES (null, id+1000);
However I'll be doing it on shop which is currently online, and I want to change everything ...
I want to develop a professional website using PHP and MySQL. Can i do it in Windows 7 (64-bit) or i need to install linux based OS. How to go for it.
...
What is the best way to create pathway with PHP (like Dailymotion)?
home > videos >search results for enrico macias mendiant de la amour > macias enrico - le mendiant de l'amour
...