I am writing a piece of small software to go through the folders and files of all the php projects that are passed in and detect if any of them is actually also a Zend project. Is there any particular file that I can immediately read and tell that the current project is a Zend project? or is there any convenient way to tell?
Problem: I want to determine the original file creation time from a file uploaded to my server via PHP.
My understanding is that the file is copied from the client to a temporary file on my server, which then is referenced in the $_FILES var. The temporary file is of course of no use because it was just created. Is there any way I could get the creation date from the clients original file?
Thanks
The PHP function oci_connect (which connects to an Oracle database) just returns false if it fails, which at the moment I handle like this:
$connection = oci_connect($username, $password, $database);
if (!$connection){
return $result = "Trouble connecting to the Oracle Database";
}
But really I'd like to have the actual ORA error code, so I can be more informative. Is this possible?
Hi, does anyone know of a known method in PHP to auto connect to MySQL db/table in case an app is using multiple databases on multiple hosts?
Question 1: are there scripts around that allow to auto connect to necessary host/DB based on query?
Question 2: if above is not possible, is there a known approach to properly passing host/DB info to make sure app is properly connected before executing the query?
Hi guys,
I'm working my way through some tutorials. I see the Zendcasts tutorials have me setting up a lot of things in the bootstrap.php file, while with the quickstart and other tutorials, don't even touch that file and do a lot of changes in the application.ini file.
What is the difference between the two and why use one over the other?
Thanks!
Is there any good (eazy to understend, small - not lotof code lines) sample of working with google openid? (php) -
What I need is to see how to get users name from google openId ;
a good way of how to integrate openid into my current users DB (tooday in DB I have table user with name and pass)?
and how to get any Idea about if useris currently loged in from this computer with openId?
I have a php application running on XAMPP but I want to connect to a mysql db running on a remote machine(which is also using XAMPP). The application works fine when I connect to the mysqldb instance on my machine. I have changed the configuration files to point to the remote db and have given the correct credentials as well. But I get access denied error.
I want a simple form with one text box and a submit button. If a user enters "foobar" into the text box and hits enter, they should be redirected to mysite.com/browse/foobar
Does anyone know how I can do this in php? thanks
What is better for PHP developer - Unicode or UTF-8?
I am going to create international CMS. So I am going to have clients all over the werld. They will speak all posible languages.
What encoding format is better for browser recognition and for DB data storing?
So I've read the two related questions for calculating a trend line for a graph, but I'm still lost.
I have an array of xy coordinates, and I want to come up with another array of xy coordinates (can be fewer coordinates) that represent a logarithmic trend line using PHP.
I'm passing these arrays to javascript to plot graphs on the client side.
I consider myself quite fluent in PHP and am rather familiar with nearly all of the important aspects and uses, as well as its pratfalls. This in mind, I think the major problem in taking on Perl is going to be with the syntax. Aside from this (a minor hindrance, really, as I'm rather sold on the fact that Perl's is far more readable), what are some key differences you think I should make myself aware of prior to taking on the language?
Hi everyone,
I have recently heard a lot of people argue about using PHP testing features like PHPunit and SimpleTest together with their IDE of choice (Eclipse for me). After googling the subject, I have still a hard time understanding the pros and cons of using these testing frameworks to speed up development.
If anyone could explain this for me in a more basic level, I would really appreciate it. I am using PHP5 for the notice.
Thanks a lot!
One from here:
$sth->execute(array(':calories' => $calories, ':colour' => $colour));
The other from here:
/*** reassign the variables again ***/
$data = array('animal_id'=>4, 'animal_name' => 'bruce');
/*** execute the prepared statement ***/
$stmt->execute($data);
My question is: :key or key ?
Sorry I don't have the PHP environment here.
So I know that my server on real form submit turns %CE%EB%E5%E3+%DF%EA%F3%F8%EA%E8%ED into ???? ??????? . How to peform string transfer from ???? ??????? into %CE%EB%E5%E3+%DF%EA%F3%F8%EA%E8%ED using ActionScript? (Its ok if a space character as %20, not + , PHP should handle that fine.)
Is it possible to translate everething written in OCaml to PHP? for example will it be hard to translate such lib as lib for Fast content-aware image resizing
In PHP I'm running a mysql_query that has an ORDER BY clause. I'm then iterating through the results to build an associative array, with the row_id as the key.
Then, I'm calling json_encode on that array and outputting the result.
This page is loaded with AJAX, and defined in a Javascript variable. When I iterate through that Javascript variable, will I still have the order that was returned from the mysql_query?
I want to be able to get the size of a file before uploading it to a PHP script using FileReference.
Can I get the file size before detecting bytesTotal during the upload process?
PHP, Cold Fusion, and ASP (among many others) are usually sold on their strengths. What are their weaknesses? If one were to develop a niche product to handle the things that these products weren't so good at, what should it focus on?
Hi..
I need to use include Function with variable.
but,when I try to do it I faced some errors .
Code :
$year=$_POST['year'];
$month=$_POST['month'];
$day=$_POST['day'];
include "Event.php?year=".$year."&month=".$month."&day=".$day;
so,can U help me ? : )
What can I do to make my PHP web application fail in a more noisy way?
I am using an MVC pattern and often when classes fail to load or failures they do so without error.
My site is having around 100+ constants defined and this can potentially reach 200.
I'm using define() for defining constant.
Will this cause a performance hit ?
How many max constants can i define in PHP ?
I have an array called $times. It is a list of small numbers (15,14,11,9,3,2). These will be user submitted and are supposed to be minutes. As PHP time works on seconds, I would like to multiply each element of my array by 60.
I've been playing around with array_walk and array_map but I can't get those working :S
Thanks.