jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
One more if (age -lt 20 AND age -gt 10) { // $age is between 10 and 20 }
-
Try to send an email to me: tuparov86@gmail.com
-
Did you check inside the junk folder?
-
Run that one into terminal: su -c 'setsebool -P httpd_can_sendmail 1' And try to send emails by your php code. Check this out - http://forums.phpfreaks.com/topic/276578-mail-php-does-not-work/
-
You are from my team Open up a terminal and run these. Check the status of sendmail first: su -c '/etc/init.d/sendmail status' If the status is Ok (running), try to send email by console: echo -e `date` | sendmail -v your_email@gmail.com PS: If the status of sendmail is down, try to restart or start the program: su -c '/etc/init.d/sendmail start'
-
What distro are you using?
-
Hey @KhaledBawz, not too much time today but when I ran your script I've got a fake result: Array ( [username] => jazzman.php ) But, userName is just jazzman, not jazzman.php, right? Secondly, what about if you have inheritance in your files, so one URL goes to second then goes to third and so on? Anyway, I am glad to see that you sorted out this issue. Have a nice day, jazz.
-
Let me see the content of your .htaccess file.
-
You have to be kidding Do you realy understand what this tool does?
-
No, no and no! The structure shoud be: / - web root (www) /stylesheets - your css files to this project /project - your project directory Now, do you understand me?
-
The first thing you should have to learn after writting the script is how to debug it? So, as a newbie read these articles, then re-write your script, give us all errors that you'll get and come back again. 1. Debugging: A Beginner's guide 2. How To Ask Questions The Smart Way 3. Php security tutorial
-
No, it's imposibble. You are doing something wrong. The path to the stylesheets directory is absolutely and independent from your project directory. Do you know what a web root folder is?
-
Question: Checked Files in mysqldatabse\data directory
jazzman1 replied to Zyphering's topic in MySQL Help
The rule says: Don't delete anything before doing a backUp to entire database server and this backUp was successfully done. -
Kevin, I am going to bookmark this reply. You have a gift to be a teacher in a college What are you still doing here? I like that!
-
get_browser working in WAMP, but not in LAMP
jazzman1 replied to mattward's topic in PHP Coding Help
Resources. -
Hey KhaledBawz, so, the best way in that case is to create a new directory inside "/" web root. For example, for all css stylesheets files you would create a directory with name stylesheets. And know the path to this directory is gonna be /stylesheets/style.css not ./stylesheets/style.css That's all. Try that now: profile.php <link rel="stylesheet" href="/stylesheets/style.css" type="text/css"> <?php if(!isset($_GET['username'])) {echo '<a href=./profile/jazzman>UserName</a>';} else { echo '<pre>'.print_r($_GET, true).'</pre>'; } .htaccess RewriteEngine On RewriteBase /work_dir RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule (.*)/$ $1 [R,L] RewriteRule ^([a-zA-Z0-9_-]+)$ $1\.php [L,QSA] RewriteRule ^/?profile/([a-zA-Z_]+)$ profile.php?username=$1 [L] If you have images doing on the same way and logic.
-
get_browser working in WAMP, but not in LAMP
jazzman1 replied to mattward's topic in PHP Coding Help
I think, that's not a server side issue. Check the php versions, also I would recommend to do this in JavaScript. -
Your post is not for here, there is an apache section in the forum. So, don't provide to users URL's like - hostName/productdetail.php?prodid=23423. The URL should be as expected - hostName/productdetail/3649 Then go to web root and create the apache rewriting rule. RewriteEngine On RewriteBase / # web root RewriteRule ^/?([0-9]+)$ productdetail.php?prodid=$1 [L]
-
Sorry for the delay, but I should have to pay the bills So, inside profile.php create this ( just for test) profile.php <link rel="stylesheet" href="stylesheets/style.css" type="text/css"> <?php if(!isset($_GET['username'])) {echo '<a href=./profile/jazzman>UserName</a>';} else { echo '<pre>'.print_r($_GET, true).'</pre>'; } The user name should be jazzman and will come dynamically from DB .htaccess file RewriteEngine On RewriteBase /work_dir RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule (.*)/$ $1 [R,L] RewriteRule ^([a-zA-Z0-9_-]+)$ $1\.php [L,QSA] RewriteRule ^/?profile/([a-zA-Z_]+)$ profile.php?username=$1 [L,R=302] Run that script and tell me what result you get.
-
Solution: Inside your view file, in that example profile.php, create a pretty link. Something like: <a href=./$userName> Username</a> And apply a third rule inside .htaccess file. RewriteRule ^/?(.*?)$ profile.php?username=$1 [L]
-
I think you want to totaly confuse apache and yourself too The userName is not a view file, everything after a "?" symbol is "QUERY_STRING", that's not a file nor a dir.
-
I'm not sure that you properly undestand the difference b/w a file and a directory. In the example above "www.mydomain.com/profile/username/", is the username a file or a directory?
-
So, the solution above could cause some problems. For example if the php file contains the same name as a sub-directory, let's say - /bash.php and /bash/ (it's a directory). To avoid that, make sure that the name of the directory has not the same name as the file that you want to rewrite. So, change that: RewriteEngine On RewriteBase /work_dir RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule (.*)/$ $1 [R,L] RewriteRule ^([a-zA-Z0-9_]+)$ $1\.php [L,QSA] If the file itself contains a "-" character(s), just add it to the regExp. RewriteRule ^([a-zA-Z0-9_-]+)$ $1\.php [L,QSA]
-
Because, the "/" symbol has a special meaning for apache server. Just apply a new rule and remove it from the url if it exists. Try, RewriteEngine On RewriteBase /work_dir RewriteRule (.*)/$ $1 [R,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([a-zA-Z0-9_]+)$ $1\.php [L,QSA] Note: Replace /work_dir with your current working directory!
-
A lot of web php sites were down 6-7 years ago of a result using persistent connections. I'm agree with requinix.