How could I measure the time taken to load a page (with various different PHP statements)?
Somewhat like the stats available here - http://talks.php.net/show/drupal08/24
i have tried this:
<?php
$fileip = fopen("test.txt","r");
?>
this should have opened the file in read only mood but it doesn't
the test.txt file is in same folder as that of index.php (main project folder)
the file doesn't open
and when i put echo like :
echo $fileip;
it returned
Resource id #3
Hi I've been trying to figure out how to put something like Joe's Fruits into a PHP array something like this:
<?php
$arr = array(
'Fruitland' => '3ddlskdf3',
'Joe's Fruits' => 'dddfdfer3',
);
?>
Using the above for example (stackoverflow's code color should tell you this by now), the array will take it as 'Joe' between the two…
Hi, I have stumbled upon a nice PHP library that uses GD to generate a reflection of a picture.
I tried to modify the way so it also display the original image above its reflection to not have to align them in HTML.
The script can be found there :
http://reflection.corephp.co.uk/v3.php
Any idea if this can be done easily ? With my tests,…
I read this article.
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
At the end of this article, it writes about PHP libraries for handling nested sets in MySQL.
Does anyone know which PHP libraries he is talking about?
What are first steps creating a loadable DLL module extension for PHP to create native support for my own library on Windows?
Would it require re-compiling PHP on windows? What are the tools needed? I don't want to have to use exec and the command line.
How do many of the websites that have logins keep the username in the username field when the password is entered incorrectly.
The form's action (it is on index.php) is another php file, which if the password is incorrect uses Header() to go back to the index and passes the error to it using GET. I could use GET to pass the username back to…
Hi guys,
I've a doubt. How can I configure my application to use www.mysite.com/myfolder instead of www.mysite.com/myfile.php?
I need to a create a profile page for every user registered to my PHP application but it's not so clear how can I do that. I've seen it's possibile with page frame, but, if possible, I prefrer don't use it.
…
I have a perl script, which takes a query string parameter, connects to a database and displays data.
I'd like to include that script in a PHP file like so:
include('perlscript.pl?item=302');
Such that the perl script's response is displayed on the PHP/HTML page.
How can I do this?
I am very used to javascript and php programing, and I just jumped into programing Objective C. After working with it for a few weeks, the methods still confused me, as to how it is passing params, and how the methods are named.
Since I am used to php, I am used to seeing:
function myFunc($param1, $param2, $param3, $param4) {
…
I did some search about this topic but found nothing valuable.
If I don't use PHP default session handler, there is no session lock at request level. So, I have to protect critical section by myself.
In Java, we have synchronized. In C#, we have lock.
In PHP, how to do that?
I've tried a variety of combinations, the following being my last attempt:
Addtype text/vnd.wap.wml wml
Addtype image/vnd.wap.wbmp wbmp
AddType text/vnd.wap.wmlscript wmls
AddType application/vnd.wap.wmlc wmlc
AddType application/vnd.wap.wmlscriptc wmlsc
AddType application/x-httpd-php .wml
How can I get stupid Apache 2.2.11 to…
Hi all,
I have learned Perl and PHP.So I want to do simple real time project in this by that I can improve my knowledge in Perl and PHP.
Can anyone suggest me any requirements.
Thanks in Advance
On Java side, we have a servlet filter that handles authentication. We don't have to change all other servlet or JSPs to add authentication to the page, unless the page needs customized content.
How can we achieve the same on PHP? We don't use any frameworks on PHP.
Since PHP has no custom-class type-casting, how would I go about doing the PHP equivalent of this Java code:
CustomBaseObject cusBaseObject = cusBaseObjectDao.readCustomBaseObjectById(id);
((CustomChildObject) cusBaseObject).setChildAttribute1(value1);
((CustomChildObject) cusBaseObject).setChildAttribute2(value2);
In my case,…
Hi,
I am trying to create graphical representations of existing code. I have tried to use VS.PHP (with Visual Studios 2010) but cant seem to generate class diagrams from this.
I have tried to use Pear's PHP UML package which has produced a lot of JavaDoc style documentation and an XMI document. From what I have read, this…
i would like to learn how to make PHP/CSS syntax generator. i assume this going to be fun and all. Is there any open source PHP/CSS syntax generator ?
Or at least, where the best syntax generator available in internet based on your experience ?
I loaded a mib into PHP with a ton of OIDs. I'd like some way to dump those out and run through them. I didn't find any way on the php website docs to do that.
Hey Guys,
This one might be a little confusing. I'm using AMCharts with rails. Amcharts comes with a PHP script to export images called "export.php"
I'm trying to figure out how to take the code in export.php and put it into a controller.
Here is the code:
<?php
// amcharts.com export to image utility
// set image…
Hello!
Does anyone know of a class/library/etc. that can simulate 32 bit unsigned integers on a 32 bit platform in PHP?
I'm porting a C lib into PHP and it uses a lot of integers that are greater than the maximum for 32 bit signed int.
I generated a text file on server1, and then I need to FTP it to server3.
Due to firewall, I could not FTP it directly but have to go through server2.
I want server1 to call PHP script on server2 and then pass the text file to server3.
Any idea how can I start with the PHP script?