jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
Apache and php are two different things! You can apply apache rewriting rules without php at all. So, back to the problem above, can I see the link that you wanna be matched.
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
What happens when you ran the script of your first post? Did you get some errors or just a blank page?
-
Do you have a meta tag with charset utf8 on the top of the page, something like: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
Hi vasko (здравей), is there a some particular reason to use JSON notation creating multiple names and input fields inside one form? I'm missing something here. Can you explain your logic, please?
-
Is there a file productdetail.php inside web root?
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
You know what a slash "/" symbol does, right?
- 45 replies
-
- apache
- mod_rewrite
-
(and 1 more)
Tagged with:
-
Ah...no! If you want to create own html email template, you should code it like it's 1995-1996 Coding an html email is basically like you're coding simple web page using old fashioned style.
-
Ok, try to connect to my testing google account. Open up the terminal to your remote server and type: openssl s_client -crlf -connect imap.gmail.com:993 // next TAG LOGIN tuparov86@gmail.com Canada2011+ If everything is OK, I shoud have receive a message from google that someone recently tried to use an application to sign in to my mail Google Account.
-
First, check whether openssl is alredy installed on the machine. Open up a ssh connection, go to the server terminal and try to login into your Google account. So, the command is: If you recieve some error message, let's see it. If everything is ok, try to run next script by php: <?php $mbox = imap_open ('{imap.gmail.com:993/ssl/novalidate-cert}[Gmail]/All Mail', 'accountName@gmail.com', "accountPassword") or die("can't connect: " . imap_last_error()); echo "<h1>Mailboxes</h1>\n"; $folders = imap_listmailbox($mbox, "{imap.gmail.com:993}", "*"); if ($folders == false) { echo "Call failed<br />\n"; } else { foreach ($folders as $val) { echo $val . "<br />\n"; } } echo "<h1>Headers in INBOX</h1>\n"; $headers = imap_headers($mbox); if ($headers == false) { echo "Call failed<br />\n"; } else { foreach ($headers as $val) { echo $val . "<br />\n"; } } imap_close($mbox);
-
Ah...now I see! You got a message from imap_last_error() right? So, if everything is OK about the username and the password, you should check inside google mail box from a message with a title - Suspicious sign in prevented! Make the server ip address to be a trust by google. That's all you can do. Never had an experiance with IMAP in php, but often use openssl in bash and I think this cause the problem.
-
It's good to share the solution in case, someone has the same problem in the future.
-
This is a good example of a full working PHP application using Smarty. Try to understand how to separate your presentation and logic. Once you got the idea, you could jump over twig and try to create the same app using twig.
-
Why don't you consider of using some template engine. I reccomend twig!
- 16 replies
-
- max-connexion
- php
-
(and 1 more)
Tagged with:
-
No, the right answer is after the last function of this mysql* (pdo) library, but on the top of the footer file will be OK too
- 16 replies
-
- max-connexion
- php
-
(and 1 more)
Tagged with:
-
Yep, now is fixed! I've got two emails from your local server:
-
The easiest way to do everything you want is to use some php mail library. i highly recommend - Swift Mailer.
-
According docs of mysql and mysqli libraries, the connection will be closed automatically when the script ends unless your connection is persistent. So, for PDO according docs, again, php won't be closed automaticaly the connection and it still remains active until the object is detroyed. Assuming we have next files: header.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <TITLE>Some title</TITLE> </HEAD> <?php // send the query to db server and display some result ?> home.php <BODY> <?php // send the query string and display something ?> footer.php <?php // do we have to close the connaection here or to the end of every including php file? ?> </BODY> </HTML> display.php <?php // open the db connection once $conn = mysql_connect('db_server','userName','userPass'); $db_name = mysql_select_db('db_name'); include 'header.php'; include 'home.php'; include 'footer.php'; What do you thing? Where should we have to close the connection?
- 16 replies
-
- max-connexion
- php
-
(and 1 more)
Tagged with: