I want display the content of doc file in a textarea for my project using PHP as it is means line break, font size etc.
Any code or how to do it. And i will be fetching that doc file from database.
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
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!
I doubt if this is encryption but I can't find a better phrase. I need to pass a long query string like this:
http://test.com/test.php?key=[some_very_loooooooooooooooooooooooong_query_string]
The query string contains NO sensitive information so I'm not really concerned about security in this case. It's just...well, too long and ugly. Is there a library function that can let me encode/encrypt/compress the query string into something similar to the result of a md5() (similar as in, always a 32 character string), but decode/decrypt/decompress-able?
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
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?
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?
It seems like I can't use shell_exec or proc_open on my shared server.
The message I get when I try to use it is:
Warning: shell_exec() has been disabled for security reasons in /home/georgee/public_html/admin/email.php on line 4
Are there any alternatives to these functions?
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.
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.
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?
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.
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.)
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 ? : )
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?
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?
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?
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
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 ?