Skip to content

Tag: php

Executing Python Script with PHP Variables

I am writing a simple application that uses information from a form, passes it through $_POST to a PHP script that executes a python script and outputs the results. The problem I am having is that my python script is not actually running with the arguments being passed in. process3.php file: Output: At the to…

dompdf HTML to PDF – can’t set margin of page

version: 0.6.0 beta 3 I tryed in every manner to make dompdf set the margin of the page. I have a long page with a lot of text, divided in chapters… my css is something like: when the php is but what I get is a page with NO margins!!! only the padding of the #wrapper are applied… and they

create DateTime string for the beginning and the end of the day

If I have a string of the following: and when I convert to a DateTime using the following function: it always gives me a DateTime with the time not set. I want to have two DateTime : one marking the beginning of the day, meaning at 00:00:00 another DateTime which is on the same date but at the end of

Project structure for PHP

I am new to PHP and want to know the directory structure for the php projects. I have experience in Java and in java we have src contains java source files, WEB-INF contains lib, and jsp pages. Do we …

Setting time zone in php

I’m using the following code to get server time. But I’m in Bangladesh and I don’t get Bangladeshi time by this. Please tell me where I have to change for the exact Bangladeshi time. $Vdate=date(“F j,…

Using PDO to CREATE TABLE

I am very new to php and this forum, so please excuse any errors or misplaced questions. In the code i provided, I am just looking to CREATE a Table in the DB “mydb”. I tested the connection to the DB(It works). It is just the creating the table i am having issues with. Any advice or criticisms wo…

Gettext will always use system default locale

I need to localise a Windows-only PHP web application and I’m evaluating the gettext extension but I’m having the hardest time trying to make it work in my Windows 7 development box. I’ve used trial and error together with Process Monitor to overcome the poor and inaccurate documentation and…