There is a way to check with a "IF" if a function fails in php?
Ex.
If (getimagesize($image) returns and error) {
echo 'Error: function dont work';
}
else
{
// do something
}
Thanks!
hai
I have a Spanish site in php. In this a mail body contain a subject "Solicitud de cotización" but the subject appears in hot mailbox like Solicitud de cotización?. But it's appear correct in mail section. How I avoid this problem. Does any one know this?
Hi,
I have a sign up page written in php, that goes to a confirmation page after processing. In the confirmation/ thank you page there is a 3rd party script that counts the number of successful registrants. how would I limit the script to be loaded per successful registration?
This command add the text "flower" to the image:
convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg
I'm using ImageMagick 2.2.0. I'm running it from PHP using:
system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg');
but I'm not getting the result
Most of "multi-platform" CI tools I've seen are in the Java/.NET world, like TeamCity or Hudson. Is there a continuous integration tool that can handle both PHP and Rails projects?
Example current URL http://www.domain.com/subdomain/install/finish.php
I use this code to get the current URL.
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
Now I want to get the URL looks like http://www.domain.com/subdomain if there don't have sub-folder it will read like http://www.domain.com
Let me know.
I have a PHP script that keeps running in the background endlessly. It also keeps flush()ing debug messages. Is there a way to display those flushed messages within another HTML page?
Hello,
I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly.
I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented.
Thank you
hi,
similiar like this example, http://stackoverflow.com/questions/1336672/php-remove-brackets-contents-from-a-string i have no idea to replace
$str = '(ABC)some text'
into
$str = 'ABC';
currently use $str = preg_replace('/(.)/','',$str); but not works. how to fix this?
I'm looking for a way to use the php number_format function or something similar that will add the thousand seperator but will leave any decimal part of the number intatct without and formatting of this. For example:
39845.25843 = 39,845.25843
347346.8 = 347,346.8
1000000 = 1,000,000
Thanks
hi
i am having a link like below
<a href="#" onclick="window.open('http://www.twitter.com/home?status=Reading+Facebook share, Yahoo Buzz and Tweet this buttons for Blogger blogs+http://www.didiknow.com');">Tweet this</a>
i want to insert a php variable value inside for the status thing
like
<a href="#" onclick="window.open('http://www.twitter.com/home?status=$markme_ddesc">Tweet this</a>
how to do so?? please help me..
I need to determine whether an HTTP request was an HTTP/1.0 or an HTTP/1.1 request in my PHP script, which is running under Apache. Is there a way to query this information?
sometext( [key] = value which content number and alphabates )
from above,i want only value part by using explode function for only one time.Is it possible.
or any other function is present in php.
Hello,
how could I add an autocomplete for PHP build-in functions like htmlentities or var_dump?
The autocompleter work for my classes but there's not autocompletion for functions like mentioned above.
hi
i m trying to run one c executable file using php exec().
when c contains a simple program like print hello i m using exec('./print.out') its working fine.but when i need to pass a argument to my c program i m uing exec('./arugment.out -n 1234') it not working .can any body tell me how to pass arugment using exec to c program.
Hello.
I got a script that create a new database, now I need to fill that database with tables and values (from a MySQL dump file).
I'm using PHP - Doctrine 1.2.
Here is how I create the database:
$manager = Doctrine_Manager::getInstance();
$newConn = $manager->openConnection($customer->Config->db_connection_string);
$newConn->createDatabase();
How I do this?
Thanks!
var_dump('<a>')
// or
var_dump("<a>")
// or
var_dump("\x3Ca>")
// all result in
string(3) ""
What is going on? Only putting a space after the less-than sign works for me.
PHP Version 5.2.10-2ubuntu6.4
I have some pages, which work fine locally(using WAMP and error_reporting E_ALL in php.ini), but once I upload them, I get the following error:
Fatal error: Call to undefined method DB::exists()
The method is there, and I don't know why it can't be seen.
Do you have an idea what went wrong?
Hi everybody,
I have built a secured login backend that controls if a user is logged in or not. If not, the user is redirected to a login page.
I would like to make a PHP function that iterates through a number of set url:s (array with url:s) to see if they are redirected or not. How could this be done?
Thanks
http://www.sendspace.com/file/2zlfgn
I have the php files i been trying to get them to save to xml.
I have tried
$product1=array();
$product1['id'] = new product( "19990","modrl","maf","purpose","war");
only the ID writes to xml. since model,maf etc are sub-elements is there a different way to create the objectarray?
I am new to php programming..
I have validated the form elements(input box,checkbox).. I am facing problems with form submission could you please help me out on this?
Hello ,
I have a php application that saves the pictures on the server and also stores the picture names in the database . The issue that I have is that the picture names include the path/folder where it was saved from (e.g 1220368812/chpk2198933_large-2.jpg) so I need a str_replace pattern to remove "1220368812/" and have the picture name correct stored in the db .
Also I would appreciate if you will send me a good link that explains how exactly the str_replace patterns work or at least how the pattern that you use work .