Hi everyone !
I've never used PHP but right now, I need to write a PHP file that displays in a log file the content of the body of a POST HTTP request.
I've read that you can access variables of the body via the _POST array.
Unfortunately, it seems to be empty, although I'm pretty sure there is stuff in my HTTP request's body !
What s...
How does the memory usage of php/apache and asp.net/iis compare as the number of simultaneous users connecting increase when running a real world app and how is the memory allocated due to the different process models ?
Examples would be great.
Figures for our current asp.net app show that the asp.net worker process on my dev box is usi...
I have 3 table: ["Order", "Order_to_goods", "Goods"]
I want to get of all participants of many-to-many relationships, by Order_ID, to can do something like that:
$Order = Doctrine::getTable('Order')->findOneById( 1 );
$Order ->loadReleated('Goods');
foreach( $Order->Goods as $product){...}
But it isn't work. Having tried everything ...
I am currently building a web app in which PHP files are loaded into a main file using jQuery's $.ajax function. However, the PHP files are obviously still accessible outside of the app, by just typing the files name in the address bar.
So my question is what would be the best way to make it so that the PHP file being 'ajaxed' in knows ...
Hi
I have a form with jQuery.validate. It checks if typed email is correct using it's own method. What i would like to achieve is to use the regex from it with my server-side php input validation.
The regex i'm talking about:
/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.( [a-z]|\d|[!#\$%&'...
Hi all,
I am using cakePHP 1.26.
In a controller, I got a function which contains these lines of code:
$this->Session->write('testing', $user);
$this->Session->read('testing');
Now the system wrote a session and stored on the server.
Is it possible to use Javascript or Jquery to read the session named 'testing' ?
...
Hi,
There is a multilingual web shop, visitors can access from two domains, with different language:
hxxp://x.com - English
hxxp://x.ru - Russian, which is an add-on domain to x.com.
The authentication and cart pages are here, through SSL:
https://x.com/index.php?mode=login
How can I use the cookie informations of x.ru on hxxps://x.co...
I am trying to invoke the Web Service PersonalDetails_Update by passing an array of values to it. These values are being successfully written to the database that the web service is designed to do. However, it is also supposed to return an ID for the record written to the database. But I don't get anything back. Just a blank screen wi...
I'm trying to display a reply form for each comment but I hide the form using Jquery and I was wondering how can I grab the comment id and add it to Jquery so it can hide each reply form and display the correct reply form correctly instead of displaying the wrong reply form?
For example, form_show_hide1, form_show_hide2, form_show_hide3...
I'm building a mail client which uses a unique identifier to identify (duh) a conversation and by doing so creating a thread.
This unique id is now attached to the subject line. Without the id in the subject line the mail gets 'lost'.
Besides the fact it clothers the subject line it would be much handier if i could add the id to a custo...
In PHP I often write lines like
isset($foo)? NULL : $foo = 'bar'
In ruby there is a brilliant shortcut for that, called or equals
foo ||= 'bar'
Does PHP have such an operator, shortcut or method call? I cannot find one, but I might have missed it.
...
i'm inserting the data into an xml file using php domdocument. however when i open the xml file, the data is displayed in a single line:
<?xml version="1.0"?>
<root><activity>swimming</activity><activity>jogging</activity></root>
how do i align it programmatically like this?
<?xml version="1.0"?>
<root>
<activity>swimming</activity...
its when i starting trying implementing this that i got quite stuck.
some business rules
1 Post can have many Tags.
1 Tag can have many Posts
the database will look like.
Posts (id, title, body, ...)
Posts_Tags (post, tag)
Tags (id, tag, ...)
when i insert - straightforward
tags will come from user input as comma separated val...
i wrote a small plugin, so i will be able to get the name of the controller in each view.
but idk how to "pass" a parameter to the view (do sumth like $this->view->foo =...;).
class Zend_Extension_Controller_Plugin_GetControllerName extends Zend_Controller_Plugin_Abstract
{
public function __construct()
{
}
public f...
I have created a simple Facebook application in PHP, that greets user by there user name,
I also want there Email id, to be displayed. But i am not able to do that. the code that i am using is,
require_once('facebook.php');
require_once('config.php');
$facebook = new Facebook(APIKEY, SECRETKEY);
$user=$facebook->require_login();
echo $...
hey everyone im new here as well as to php only been at it for about 2 months kinda learning as i go. what i need to get done right now is to take data from about 16 different tables in a data base and duplicate the tables. the table are for applicants and either have an application id in common or a family id in commmon the id's are jus...
I have a string like this:
" 23 PM"
I would like to remove 23 so I'm left with PM or (with space truncated) just PM.
Any suggestions?
Needs to be in PHP
...
Currently I have an array that lists email addresses as the key and urls as the values, I want to use parse_url (unless something better is suggested) and create another dimension to the array with the base url. This is what I currently have:
array (
'[email protected]' =>
array (
0 => 'http://www.google.co.uk/foo/bar',
1 => '...
A client of mine needs to bill his customers $25 up front for a product and then $55 six weeks after their purchase. He's using an Authorize.net merchant account and does NOT want to pay extra for their Automated Recurring Billing (ARB) API. What's the best way to do this delayed payment?
...
Hello all,
To throw an exception we need to include a CustomException class.
include_once("CustomException.class.php");
Ok.
On another file, when we use the try/catch blocks, do we need to require or include, our CustomException class again?
Thanks in advance,
MEM
...