I am in the process of planning for a series of websites that will all point to the same server and share the same back end code, but have different domain names, different content, and look completely different. Here is my issue, say a user visits one website and adds something to the cart, then visits the other website. (which is actua...
I am trying to output a sigma character () in a label in a FusionChart graph. How can I specify that character in a PHP string? I have tried the htmlentity σ, but it is not interpreted correctly by the graph. Is there any way to specify the character in PHP using some sort of character code?
...
I'm using the PHP Doctrine ORM to build my queries. However, I can't quite seem to figure how to write the following WHERE clause using DQL (Doctrine Query Language):
WHERE name='ABC' AND (category1 = 'X' OR category2 = 'X' OR category3 = 'X')
AND price > 10
How can I specify where the parentheses go?
What I currently have in my PH...
I am trying to connect to a secure LDAP server (using LDAPs) via PHP, but I am having problems with it. I get the following error
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in /var/www/test.php on line 16
I works when I try to connect without LDAPs, but it is required that I use LDAP...
Hello,
I have 2 files namely:
uploading.php
emaillinks.php
both include a file inc.php which has all the include files and initiate database connection.
a variable is declared in file uploading.php, i wanted to know how can i access it in emaillinks.php, i cant include uploading.php in emaillinks.php.
I want to avoid cookies becau...
Hello everyone,
I work on a code base written in php 4. I'd like to go through the process of upgrading the code to php 5 (the latest version my host provides). I'm wondering if anyone else has gone through a similar upgrade experience and can share what gotchas/pitfalls there are, what has to change in my code, what is not backwards co...
This should be a simple question, but I just can't recall the relevant API. A search on google with the term "combine directory name php" doesn't yield any results. So I guess I am doing both myself and the programming community a service by asking this question.
How to combine directory and file name to form a full file path in PHP? Le...
People want to use my Jquery plugin, but get a list of images from a database instead of a directory, which is the standard way the plugin works.
My Jquery plugin that uses the ajax() function to deliver & return data to a php script.
The php script pulls files from a directory with getdir(), adds those files to an array and assigns th...
I've been having to do some basic feed processing. So, get a file via ftp, process it (i.e. get the fields I care about), and then update the local database. And similarly the other direction: get data from db, create file, and upload by ftp. The scripts will be called by cron.
I think the idea would be for each type of feed, define the...
Can anyone help me to do this in the right way?I mean.. like that : $db->select()->group..... I tried a few times, but doesn't work for me :(
$this->q->fetchAll('select * from clubs, club_photos_default where clubs.id=club_photos_default.c_id group by clubs.id');
Best Regards,
...
So I have the following:
<?php
show_form();
?>
<form id="add" method="post" action="addIssue.php">
Name:
<?php input_text('name','str_name', $defaults , '1'); ?>
<input class="submit" type="submit" value="Begin download" />
<input type="hidden" name="_submitCheck" value="1"/>
</form>
<?php
function show_form($er...
That's pretty much it. Scoping in most OO programming languages resolves symbols fine without an explicit reference to the current instance (i.e. '$this' in PHP). Why does PHP require me to precede every call to a member function in the same class with $this?
...
Can I somehow ignore the post with the earliest date? With SQL or PHP?
SELECT subject, date
FROM posts
WHERE id = $id
ORDER BY date DESC
while ($row = mysql_fetch_array($query)) {
Cheers
...
So I work in a PHP shop, and we all use different editors, and we all have to work on windows. I use vim, and everyone in the shop keeps complaining that whenever I edit a file there is a newline at the bottom. I've searched around and found that this is a documented behavior of vi & vim... but I was wondering if there was some way to d...
Hello,
I have a PHP script running on XAMPP in Windows XP that will open a .doc file and then save it as a different copy. This was working fine earlier on, but out of nowhere the error message keeps appearing.
$path = "c:/xampp/htdocs/";
com_load_typelib('Word.Application');
$word = new COM("word.application") or die("Unable to instan...
I have an object like this:
class FanStruct{
public $date;
public $userid;
function __construct($date, $id){
$this->date = $date;
$this->userid = $id;
}
}
I have maximum of 30 of them in an array, and they are sorted by $userid.
What is the best way to go though the array, and remove duplicate objects base...
What I am trying to accomplish here is to separate a firstname, lastname combo to store in a database. I already added the the new columns in the database to hold the first and last names. What I need to do now is to actually separate them and run an SQL update against the changes.
Can someone please give me a hand? Thanks.
Here is my ...
I've a directory outside the webroot with images, css and javascripts.
These files often change. I could write a script which locates the file, figures out the mime type and outputs it to the browser.
Or i could locate the file, copy it to a webaccessable directory and redirect to that file using header location. When the file is reques...
i am try to convert some file with exec in php and get the return . i do this and this is work so successfully but if i run it for more than 10 times, the webserver (wampserver) get crash and i must restart server to continue ?
please let me know what is the problem if you know .
System : wampserver version 2.0 on windows xp and 2003 se...
I have successfully installed the iPaper module from Scribd.com. But I could not upload files. What's happening is that the "attachment" is being uploaded to my webserver but it wouldn't go to scribd.com. Any tips on what to look for?
...