How in PHP do I get the regular timestamp format out of a MongoDB date? Assume I have: $my_date; print_r($my_date); The print_r output is: MongoDate Object ( [sec] => 1346300336 [usec] => …
Get date in Leap years php
I want to convert 59 to 2012-feb-29. I already know current year is 2012. I try following code. but it give 2012-mar-01. $string = ’59 2012′; $date1 = date_create_from_format(‘z Y’, $string); $…
Apache shows PHP code instead of executing it
I have recently been trying to install PHP and Apache on my computer. After many hours, they’re installed. I have modified the httpd.conf and php.ini files like everyone says. I then created a simple PHP script: But when I try to run it with http://127.0.0.1/phpinfo.php it just shows the source code ins…
domain registry api integrate in php
I want to integrate one API with one of my website which is a task given by my senior.The API is about searching domain name already present or not..please help me on this topic please give me n example which i can refer.my website is in PHP. Answer [EDIT 2] As @Poe mentions in his comment, gethostbyname is p…
does multiple upload follow the same order of uploading in which we select the images?
i am using HTML5 multiple upload feature. its working perfect. Now I have one query does multiple uploading follow any order while uploading images? suppose I have 5 images now while uploading images if I select images in below order does these images would be uploaded in the same order I select? means $_FILE…
How to make PHP store information untill purchase is complete?
I am trying to make a form that is for customizing a YouTube background. anyways. I coded this in HTML and when you hit submit, it sends the information to a PHP file that processes the information and sends it as an e-mail. This works fine but I need to set it up so it doesn’t send me the e-mail
What do the dots mean in relative file path?
I am new to programming and learning php on my own. I have two question about the following relative path of a file My questions about the relative path in the code above are that: What I understand, $_SERVER[DOCUMENT_ROOT] points to the very root directory of the file structure like htdocs, www or public_htm…
openssl_pkey_new() throwing errors — Proper openssl.cnf setup for php
**Okay, It’s become clear that this issue is an issue related with the setup of openssl on the Linux server and how to properly setup a custom openssl.cnf file. I am not looking for anything …
Stuck with the number pattern printing in PHP
Stuck with the number pattern printing logic. Let me know what i am doing wrong as my file is simply going on execution without giving me a pattern. My Code — Pattern to achieve — UPDATE After applying new changes following are the screenshots — Answer Your error is in the last for, that sho…
Rooms & Availability Dates PHP/MySQL
So, I’m desinging a web application that is going to work for a Hotel and it should eventually become an easy way to install for every hotel website with some extra code. The application is working with php and mysql. So, as you probably guessed, I’m pretty confused with the database structure. Th…