Search Results

Search found 11 results on 1 pages for 'php6'.

Page 1/1 | 1 

  • Le développement de PHP6 est suspendu, reprendra-t-il un jour ?

    Mise à jour du 22.03.2010 par Katleen Le développement de PHP6 est suspendu, reprendra-t-il un jour ? Après moult déboires, le développement de PHP6 a finalement été arreté. L'implémentation d'Unicode dans le futur langage devanait un véritable casse-tête technique qui aurait motivé ce jeté d'éponge. C'est UTF-16 qui avait été choisi pour le support de l'Unicode dans PHP, mais ce développement s'est avèré trop difficile et la compatibilité très mauvaise. Le travail est donc mis en stand-by pour une durée indéterminée, le temps de se vider la tête pour les programmeurs, puis de réfléchir à une autre solution pour l'intégration d'Unicode. PHP6 sera-t-il achevé un jo...

    Read the article

  • php cookie not working

    - by Jacksta
    I am trying to use a cookie with authentication. This page works once entering user and pass <? if ((!$_POST[username]) || (!$_POST[password])) { header("Location: show_login.html"); exit; } $db_name = "testDB"; $table_name = "auth_users"; $connection = @mysql_connect("localhost", "user", "pass") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection) or die(mysql_error()); $sql = "SELECT * FROM $table_name WHERE username ='$_POST[username]' AND password = password('$_POST[password]')"; $result = @mysql_query($sql, $connection) or die(mysql_error()); $num = mysql_num_rows($result); if ($num != 0) { $cookie_name = "auth"; $cookie_value = "ok"; $cookie_expire = "0"; $cookie_domain = "domain.com.au"; setcookie($cookie_name, $cookis_value, $cookie_expire, "/", $cookie_domain, 0); $display_block = " <p><strong>Secret Menu:</strong></p> <ul> <li><a href=\"secretA.php\">secret page A</a> <li><a href=\"secretB.php\">secret page B</a> </ul>"; } else { header("Location: show_login.html"); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Secret Area</title> </head> <body> <? echo "$display_block"; ?> </body> </html> WHen clicking on either secretA.php or secretB.php I am redirected to log in again, it should work. here is the code. secretB.php <?php if ($_COOKIE[auth] == "ok") { $msg = "<p>Welcome to secret page B, authorised user! </P>"; } else { header( "Location: /show_login.html"); exit; } ?> <HTML> <HEAD> <title>Secret Page B:</title> </HEAD> <BODY> <? echo "$msg"; ?> </BODY> </HTML>

    Read the article

  • HTML / PHP from

    - by user317128
    I am trying to code an all in one HTML/PHP contact from with error checking. When I load this file in my browser there is not HTML. I am a newb php programmer so most likely forgot something pretty obvious. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>All In One Feedback Form</title> </head> <body> <? $form_block = " <input type=\"hidden\" name=\"op\" value=\"ds\"> <form method=\"post\" action=\"$server[PHP_SELF]\"> <p>Your name<br /> <input name=\"sender_name\" type=\"text\" size=30 value=\"$_POST[sender_name]\" /></p> <p>Email<br /> <input name=\"sender_email\" type=\"text\" size=30 value=\"$_POST[sender_email]\"/></p> <p>Message<br /> <textarea name=\"message\" cols=30 rows=5 value=\"$_POST[message]\"></textarea></p> <input name=\"submit\" type=\"submit\" value=\"Send This Form\" /> </form>"; if ($_POST[op] != "ds") { //they see this form echo "$form_block"; } else if ($_POST[op] == "ds") { if ($_POST[sender_name] == "") { $name_err = "Please enter your name<br>"; $send = "no"; } if ($_POST[sender_email] == "ds") { $email_err = "Please enter your email<br>"; $send = "no"; } if ($_POST[message] == "ds") { $message_err = "please enter message<br>"; $send = "no"; } if ($send != "no") { //its ok to send $to = "[email protected]"; $subject = "All in one web site feed back"; $mailheaders = "From: website <some email [email protected]> \n"; $mailheaders .= "Reply-To: $_POST[sender_email]\n"; $msg = "Email sent from this site www.ccccc.com\n"; $msg .= "Senders name: $_POST[senders_name]\n"; $msg .= "Sender's E-Mail: $_POST[sender_email]\n"; $msg .= "Message: $_POST[message]\n\n"; mail($to, $subject, $msg, $mailheaders); echo "<p>Mail has been sent</p>"; } else if ($send == "no") { echo "$name_err"; echo "$email_err"; echo "$message_err"; echo "$form_block"; } } ?> </body> </html> FYI I am trying the example from a book named PHP 6 Fast and Easy Wed Development

    Read the article

  • HTML / PHP form

    - by user317128
    I am trying to code an all in one HTML/PHP contact from with error checking. When I load this file in my browser there is not HTML. I am a newb php programmer so most likely forgot something pretty obvious. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>All In One Feedback Form</title> </head> <body> <? $form_block = " <input type=\"hidden\" name=\"op\" value=\"ds\"> <form method=\"post\" action=\"$server[PHP_SELF]\"> <p>Your name<br /> <input name=\"sender_name\" type=\"text\" size=30 value=\"$_POST[sender_name]\" /></p> <p>Email<br /> <input name=\"sender_email\" type=\"text\" size=30 value=\"$_POST[sender_email]\"/></p> <p>Message<br /> <textarea name=\"message\" cols=30 rows=5 value=\"$_POST[message]\"></textarea></p> <input name=\"submit\" type=\"submit\" value=\"Send This Form\" /> </form>"; if ($_POST[op] != "ds") { //they see this form echo "$form_block"; } else if ($_POST[op] == "ds") { if ($_POST[sender_name] == "") { $name_err = "Please enter your name<br>"; $send = "no"; } if ($_POST[sender_email] == "ds") { $email_err = "Please enter your email<br>"; $send = "no"; } if ($_POST[message] == "ds") { $message_err = "please enter message<br>"; $send = "no"; } if ($send != "no") { //its ok to send $to = "[email protected]"; $subject = "All in one web site feed back"; $mailheaders = "From: website <some email [email protected]> \n"; $mailheaders .= "Reply-To: $_POST[sender_email]\n"; $msg = "Email sent from this site www.ccccc.com\n"; $msg .= "Senders name: $_POST[senders_name]\n"; $msg .= "Sender's E-Mail: $_POST[sender_email]\n"; $msg .= "Message: $_POST[message]\n\n"; mail($to, $subject, $msg, $mailheaders); echo "<p>Mail has been sent</p>"; } else if ($send == "no") { echo "$name_err"; echo "$email_err"; echo "$message_err"; echo "$form_block"; } } ?> </body> </html> FYI I am trying the example from a book named PHP 6 Fast and Easy Wed Development

    Read the article

  • Creating a Model using Stored Procedures with Zend Framework

    - by jwhat
    I'm using Zend Framework and I'd like to build a model to perform read/write operations on a database... using stored procedures. I know how stored procedures work, but I have yet to use them within Zend Framework. Is there any built in support for stored procedures that I should know about? What is the best practice way to create a model in this senario? Should I extend Zend_Db_Table_Abstract or some other class?

    Read the article

  • What is the holdup on PHP 6?

    - by Billy ONeal
    I've read in multiple places, including highly recommended PHP books published several years ago, that PHP 6 was just over the horizon, and would fix several of the BIG outstanding issues with PHP (namely unicode support). However, its been several years even since I've read those books, and PHP 6 is still not considered kosher for production use. Is there a specific feature that is proving difficult to implement or is it a simple lack of community desire to develop PHP 6?

    Read the article

  • Checking for valid document files

    - by sweb
    I need a simple way to check if my files are valid documents (pdf, doc, docx, ppt, pptx, xls, xlsx, odt, ods, odp and etc). I can't use file because magic does not work well at all. For example, for PDF files, this is my output. sweb@sweb-laptop: /media/files/ebooks/PDF and CHM$ file --mime *. Pdf PHP 5 for Dummies. Pdf: application/pdf; charset=binary PHP 6 and MySQL 5 for Dynamic Web Sites. Pdf: application/octet-stream; charset=binary PHP6 and MySQL Bible. Pdf: application/pdf; charset=binary PHP6.pdf: application/octet-stream; charset=binary PHP and MySQL for Dummies SE. Pdf: application/pdf; charset=binary For example, I use abiword – which is a good tool – but it converts any format. It doesn't check for valid documents: abiword --to=txt --to-name=output.txt audio.mp3 Is there any command available to check for valid documents then?

    Read the article

  • What is AddType application/x-httpd-php-source

    - by egor
    I have the apache2.0, PHP5.2.4 and the directive in the httpd.conf: AddType application/x-httpd-php-source .php .php3 .php4 .php5 .php6 AddType directive is used to maps the given filename extensions onto the specified content type. This is the only meaning of this directive. But why does this method switch off PHP handler, that assigned .php extensions, and I can view source code of scripts in my browser? And another: AddType application/x-httpd-php5 .php Why does this method switch on PHP handler? This simply must send header "Content-Type: application/x-httpd-php5" to my browser and this must be only meaning of directive AddType from mod_mime. I'm confused. Thanks for your replies.

    Read the article

  • Void in main and keeping Dos program from dying

    - by TimothyTech
    Alright, so im using bloodshed complier, first thing i should note is im using a 2001 edition C++ for the aboslute beginner, was there any changes to C++ since 2001 that would effect the validity of this book? i ask because i know php has php5 and now php6 but i havent seen any C++3. now for the reason i asked that, in this code it uses, void main (void) why would i want an arguement to be void? what does this do. But when i run the " void main (void) in my compiler it says that main must have a "int" before it. so i cant have "void" main (void); also, once the code runs through, as long as there isnt a "cin" the program closes. is this normal behavior, is there a better way to stop this besides making a cin at the end of my program.

    Read the article

  • simple php script

    - by Nerdysyntax
    New to php and taking a class for it. Bought php6 and mysql 6 bible to get started. Of course the hello world script is the first you get and it doesn't show. It just reads part of my script and I'm not sure the problem. Link to test - http://harden6615.com/ I am using a hosted server I bought for class, but I have also check it using MAMP. I figured my script is wrong, but I have copied and pasted and still no Hello World. Any suggestions? What I copied: <?php print("Hello, World<BR />\n"); phpinfo(); ?>

    Read the article

  • Are short tags *that* bad?

    - by Col. Shrapnel
    Everyone here on SO says it's bad, for 3 main reasons: XML is used everywhere You can't control where your script is going to be run short tags are going to be removed in PHP6 But let's see closer at them: Last one is easy - it's just not true. XML is not really a problem. If you want to use short tags, it won't be a problem for you to write a single tag using PHP echo, <?="<?XML...?>"?>. Anyway, why not to leave such a trifle thing for one's own judgment? PHP configuration access. Oh yes, the only thing that can be really considered as a reason. Of course in case you plan to spread your code wide. But if you don't? I think most of scripts being written not for the wide spread, but just for one place. If you can use short tags in that place - why to abandon them? Anyway, it's the only template we are talking about. If you don't like short tags, PHP native template is probably not for you, why not to try Smarty then? Well, the question is: is there any other real reasons to abandon short tags and make it strict recommendation? Or, as it was said, better to leave short tags alone?

    Read the article

1