Hi I have a wordpress installed on
h*ttp://domainname.com
and I would like to have replication of the same website on a subdomain for example
h*ttp://sub1.domainname.com
h*ttp://sub2.domainname.com
What should I do to make this happen without copying any database and the wordpress should be smart enough to recognize the...
In the PHP manual of PCRE, http://us.php.net/manual/en/pcre.examples.php, it gives 4 examples of valid patterns:
/<\/\w+>/
|(\d{3})-\d+|Sm
/^(?i)php[34]/
{^\s+(\s+)?$}
Seems that / , | or a pair of curly braces can use as delimiters, so is there any difference between them?
...
Hi,
I am working on an iPhone game which is depended on a LAMP server. I want to create a "event" based system where the apache server sends an event to the iphone.
For this, I am thinking of using "CFStreamCreatePairWithSocketToHost" to connect to port 80 of the apache server.
I am able to successfully connect to the server and open...
Hi everyone,
What do I need to do to call $this->two() from inside my function innerOne? Is that possible with PHP OOP?
Here's the error I am recieving:
Fatal error: Using $this when not in object context
Here's how my code looks:
class myClass {
function one(){
function innerOne() {
// Some code
...
I have a LAMP server running. External services connect to this server (services running on iPhone).
I want, from a php script, to get a list of all the services that have connected to the Apache server... How do I do it? Should I use fsockopen?
Any help would be greatly appreciated.
...
I'm having the following scenario:
class A { public static $arr=array(1,2); }
class B extends A { public static $arr=array(3,4); }
Is there any way to combine these 2 arrays so B::$arr is 1,2,3,4?
I don't need to alter these arrays, but I can't declare them als const, as PHP doesn't allow const arrays.http://stackoverflow.com/questio...
So I found this beautifull script for FLV video format Http Pseudo Streaming but in is in PHP ( found on http://stream.xmoov.com/ )
So does any one know opensource translations or can translate such PHP code into C#?
<?php
/*
xmoov-php 1.0
Development version 0.9.3 beta
by: Eric Lorenzo Benjamin jr. webmas...
I have a function
function do_something() {
// process
$this->load->view('some_view', $data);
exec('mv /path/to/folder1/*.mp3 /path/to/folder2/');
}
My intention is to move files after outputting the view. But apparently it is done before rendering the view. My question is, does $this->load->view(); have to be the final st...
Possible Duplicate:
Do I have to use mysql_real_escape_string if I bind parameters?
I have a quick MySQLi security related question...
For example, take a look at this code (gets input from the user, checks it against the database to see if the username/password combination exist):
$input['user'] = htmlentities($_POST['usern...
I can create paths with no problem, but I want to know which of these 3 methods is the most rock solid and reliable and will work on the most servers.
Right now I am using method 1 in my script and some users are having path issues. I just want the method that will work on any version of php and almost any server config.
1. <?php ...
I have a url like http://localhost:8020/stream.flv
On request to my php sctipt I want to return (be something like a proxy) all data I can get from that URL (so I mean my php code should get data from that url and give it to user) and my header and my beginning of file.
So I have my header and some data I want to write in the beginning...
the best way, you think.
thanks.
...
Hi!
Is there anything that can make the returned length of the PHP CRC32 function to vary?
Thanks!
...
Where can I find tutorials about creating a social network (like db structure, sql query samples eg.) using PHP & MySQL ? I do not need a ready script, I just want to learn how to do it..
...
I have a problem with Zend_Navigation that I am hoping for a little guidance on.
I'm in the process of adding a Zend_Navigation to a legacy app as described [here on SO].1
The thing that I am not sure of is how to add parameters to the navigation menu after the data is loaded from the xml file.
What I want to do is get 2 identifying p...
Hello!
So I have a table schema that has users who can be friends.
User:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true }
email: { type: string(255), notnull: true, unique: true }
nickname: { type: string(255), unique: true }
password: { type: string(300), notnull: true }
image: { ...
I am trying to echo €00.00 if my variable $amount equals zero
I have done something wrong can you help??
Code
while ($row9 = mysql_fetch_array($result9))
{
$amount = $row9['amount'];
}
//$amount = $amount / 60;
//$amount = round($amount, 2);
if $amount == 0 echo "<b>Balance: €00.00</b>";
else
echo "<b>Balance: $$amount</b>";
...
I am trying to use ORM to access data stored, in three mysql tables 'users', 'items', and a pivot table for the many-many relationship: 'user_item'
I followed the guidance from http://stackoverflow.com/questions/1946357/kohana-3-orm-read-additional-columns-in-pivot-tables
and tried
$user = ORM::factory('user',1);
$user->items-...
I have facebook java api. Using this how can I login if i have email and password?
...
I would like to log errors/informational and warning messages from within my web application to a log. I was initially thinking of logging all of these onto a text file.
However, my PHP web app will need write access to the log files and the folder housing this log file may also need write access if log file rotation is desired which m...