I'm running in to the issue below when trying to run the following:
$store = new Store();
$store->url =$this->form_validation->set_value('website');
$store->save();
$store_id = $store->identifier();
Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'Couldn't get last insert identifier.' in /home/yummm/public...
i get an website html data .and i need to change all the links to remote website..
like if i have an link <a href="/search?"> i need to change to <a href="http://google.com/search?">
...
This is what I have so far:
<?php
$file = "18201010338AM16390621000846.png";
$test = file_get_contents($file, FILE_BINARY);
echo str_replace("\n","<br>",$test);
?>
The output is sorta what I want, but I really only need lines 3-7 (inclusively). This is what the output looks like now: http://silentnoobs.com/pbss/collector/test.ph...
In my backend I'm using jquery 1.4.1 and the newest UI 1.8rc1. I defined a couple of buttons that do things... one is create a certain type of page using serialize functions calling a php file and then reloading the entire page. locally this always works like a charm! but as soon as i put it on my providers webserver, it only works in ab...
Yesterday Facebook launched HipHop, a sourcecode-converter from php to c++. The set of php functions and constructions is more limited that standard php.
Are the current popular php frameworks (ZF, CakePHP, symphony) compatible with HipHop? If not, which parts of this frameworks are not usable?
...
Hi,
I am trying to use Searchable Behaviour hosted here: http://code.google.com/p/searchable-behaviour-for-cakephp/
To initialize the search_index table with existing data, I have used this: http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=1&q=controller Reply No. 2 which creates the class SearchController.
...
I am using Zend Framework. I want to fetch record from database without considering case sensitive.
This is my Person Table:
Id|Name |Gender|Occupation
-----------------------------------
1 |Naveed|Male |Software Engineer
-----------------------------------
2 |Ali |Male |Software Developer
Now If I use the following strings to s...
hi!
I want to extract the contents of a excel file and populate them in a new post( page) . I'd like to maintain the row-column relationship.
Ex:
sample.xls
Name | Age | Sex
A | 20 | M
B | 30 | F
C | 40 | M
In Drupal (the one which i want)
Name | Age | Sex
A | 20 | M
B | 30 | F
C | 40 | M
Is there any module in Drupal to d...
i am looking for a new php(5) framework it must be lightweight(x<500kb), oop, have orm, active record built in, simple to learn, fast to use, active community and dev.
I need it for small, personal app development.
My php skills are quite low and i have .net background. I have previously used LightVc+cough and codeIgnitor php frameworks...
i want to Adds an empty directory in the archive.
ZipArchive::addEmptyDir
this function add it
but i the root only
assume i want add it in
/dir/dir/
i cant
<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
if($zip->addEmptyDir('newDirectory')) {
echo 'Created a new root directory';
} else {
...
I am trying to convert a string to an image using the "imagecreatefromstring" function
(I've attached the code below). It works for most images, but when I try to convert
larger images, a small portion of the image does not get converted (the lower part
of the image is just grey)
my code is (take it from php.net example) :
...
I created a search facility with ExtJS and PHP. The PHP file is the server side script with communicates with the database. On my Linux Environment, its working flawlessly. However, since I need to install this application on a Windows Server, I tried to copy it to my personal Windows XP.
I installed Apache, PHP with the necessary exten...
Currently if I use facebook's require_login, it appears to go into an infinite loop of appending to the url. All of my controllers inherit from a FB_Controller that upon construction does:
$this->facebook = new Facebook($this->API_KEY, $secret);
$this->uid = $this->facebook->require_login(); //Causes infinite loop!
I had to explicitly...
Though this thread recommends using it, I've few concerns:
I started with Zend Framework 1.6 like 8 months ago. Now they've released 1.10. So they're releasing new version in every 2 months.
There are several things which have been drastically changed (like bootstrap class in main application folder, it wasn't there earlier. It was sim...
I have a mysql table:
(Questions) =>
question_id(PK),
question(varchar),
order(int)
When displaying the data in a html table: the order of the data is sorted by 'order'. Is there a way to make changes in the 'order' using buttons(move-up/down) then update the order in the database?
Thanks in advance!
...
What is difference between mysql,mysqli and pdo ?
Which one is the best suited to use with PHP-MYSQL?
...
I'm developing a web service with Zend, more specifically I'm Zend_Amf for interop with Adobe Flex. The problem with this is that I can not easily see PHP errors because the Flex debugger won't display the actual answers from the server unless they are proper Amf. If I visit the Zend_Amf endpoint with the Web Browser I don't get any erro...
I am writing a simple REST service, which responds to requests from clients. All in PHP.
My concern is, that when my server responds to a request, it could end up tying up resources if the client side is too slow in sending back "ok" response.
How do I send a POST request via lib_curl setting it to not wait for any responses, but rathe...
This is just a simple check to see what letter grade to output. Is there any faster and more efficient way to achieve the objective?
if ( $grade >= 90 ) {
echo "A";
} elseif ( $grade >= 80 ) {
echo "B";
} elseif ( $grade >= 70 ) {
echo "C";
} else {
echo "Failed."
}
...
I'm trying to use Imagick via php to generate a 8bit bmp from jpg. But i would like the pixel colors to start at index 16 rather than 0. The code below shows how to generate the bmp in the correct format i need, but the palette index defaults to 0. Is there a way to make sure the palette start at another index?
$average = new Imag...