Jump to content

milanello72

Members
  • Posts

    37
  • Joined

  • Last visited

milanello72's Achievements

Member

Member (2/5)

0

Reputation

  1. hi... my code works fine on localhost... but on server there are some problems... If I want to see this page katarinabulatovic.webuda.com/katarina/senior-clubs.html then I will have this error: The requested URL /katarina/senior-clubs.html was not found on this server. On server in the root directory it was necessary to put in .htaccess this code: RewriteBase /katarinabulatovic.webuda.com and I have 2 directories because the website has 2 versions... In every folder I have put a file .htaccess ... For example in the folder katarina I have this code: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^index.html index.php [N] RewriteRule ^([a-zA-Z0-9-_]+).html$ index.php?pagina=$1 [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+).html$ index.php?pagina=$1&poll=$2 [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+)/([0-9-_]+)$ index.php?pagina=$1&paginaphoto=$2&id_photo=$3 [L,QSA] but I have a problem... If I want to see this page katarinabulatovic.webuda.com/katarina/senior-clubs.html then I will have this error: "The requested URL /katarina/senior-clubs.html was not found on this server'. and if I am in the first version "katarinabulatovic.webuda.com/katarina/" here I have a button "katarinabulatovic.webuda.com/32katarina/index.html" where I want to see the second version, but when I try to see this page I have an error that this page doesnt exist..... Is it correct to use a file .htaccess for every folder (because I have 2 versions on the website)? thank you!
  2. it works, but I have a problem in this situation: print '<a href="/calcioitalia/teams/'.seoUrl($numele.' '.$id_squadra.'.html').'">'.$nume.'</a>'; with $numele='José Mário' where function seoUrl($string) { //Unwanted: {UPPERCASE} ; / ? : @ & = + $ , . ! ~ * ' ( ) // $string = strtolower($string); //Strip any unwanted characters $string = preg_replace("/[^A-Za-z0-9._\s-]/", "", $string); //Clean multiple dashes or whitespaces $string = preg_replace("/[\s-]+/", " ", $string); //Convert whitespaces and underscore to dash $string = preg_replace("/[\s_]/", "-", $string); return $string; } so, how could I solve the problem? Thank you!
  3. hello! I have a problem with utf-8 ... In horizontalmenu.php I have: print '<a href="/calcioitalia/coaches/'.$name.'.html').'">'.$name.'</a>'; where $name=José Mário and in .htaccess I have AddDefaultCharset UTF-8 AddCharset UTF-8 .html and doesn't work... How could I solve this problem? Thank u!
  4. So, is it possible to modify the website and to use OOP? Do you know a good video or a good article on web? Thank you!
  5. Hello! i'm newer in OOP and I have made an website in PHP classic. I want to modify the website and to use OOP. For example in .htaccess I have RewriteRule ^index.html index.php [N] RewriteRule ^([a-zA-Z0-9-_]+).html$ index.php?pagina=$1 [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+).html$ index.php?pagina=$1&poll=$2 [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+)/([0-9-_]+)$ index.php?pagina=$1&paginaphoto=$2&id_photo=$3 [L,QSA] #RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+)/([0-9-_]+)/?.jpg$ index.php?pagina=$1&paginaphoto=$2&id_photo=$3 [L,QSA] in index.php I have if ($_GET['pagina']=='katarina') { if ($_GET['paginaphoto'] == '') { echo '<td valign="top" style="border-left: 1px solid #cccccc; padding: 2px;">'; include('includes/katarina.php'); } elseif ($_GET['paginaphoto'] == 'photo') { echo '<td valign="top" style="border-left: 1px solid #cccccc; padding: 2px; border-right: 1px solid #cccccc; padding: 2px;">'; include('includes/photo.php'); } elseif (!empty($_GET['paginaphoto']) and $_GET['paginaphoto'] != 'photo') { echo '<META HTTP-EQUIV="Refresh" Content="0; URL=/katarina/index.html">'; exit; } } so in index.php I used the method GET to load the page katarina.php My problem is how could I change index.php if I would want to use OOP? I need some suggestions of you... Or maybe a good video on youtube or a good article on web. Thank you very much!
  6. Hi! I'm newer in codeigniter and I have searched on web an example of code captcha that works. Many examples not working, but an example maybe could work. This example is here http://runnable.com/UXb8GazDrMMiAAEA/how-to-add-a-captcha-in-codeigniter I want to use this example, but I don't know how to configure the files from application/config Could you help me? If you know an example that works you could say me the address on web. Thank you very much!
  7. Hello, Requinix! I have tried, but didn't work. In this moment you could see the link here http://www.katarinabulatovic.uhostall.com/32katarina/index.php And I want to obtain http://www.katarinabulatovic.uhostall.com/index.php so without 32katarina. I have all files in the folder 32katarina and .httaccess is Options +FollowSymlinks RewriteEngine on php_flag session.auto_start 1 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^index.html index.php [N] RewriteRule ^([a-zA-Z0-9-_]+).html$ index.php?pagina=$1 [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+).html$ index.php?pagina=$1&poll=$2 [L,QSA] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+)/([0-9-_]+)$ index.php?pagina=$1&paginaphoto=$2&id_photo=$3 [L,QSA] AddType image/x-icon .ico RewriteRule ^favicon.ico favicon.ico [NC,L] ErrorDocument 404 /errors/404 ErrorDocument 403 /errors/403 ErrorDocument 500 /errors/500 What can I add in .htaccess ? Thank you!
  8. All files from katarina forlder are staying there. (in the katarina folder) (please, excuse me beacuse I don't know to work very well with .htaccess)
  9. Hello! I have 2 problems with .htaccess . 1) I have a path http://www.myaccount.domain.com/katarina/index.php and I want to remove the folder katarina and to obtain http://www.myaccount.domain.com/index.php How could I solve this problem? 2) I have a path on localhost http://127.0.0.1:8888/katarina/index.php and I want to remove the folder katarina and to obtain http://127.0.0.1:8888/index.php (soI want to remove my folder "katarina") How could I solve this problem? Thank you!
  10. This script in .htaccess works only if I have favicon.ico in the root. AddType image/x-icon .ico RewriteRule ^favicon.ico favicon.ico [NC,L] I want to put favicon.ico in the directory IMAGES How could I change .htaccess? Thank you!
  11. I have put ob_flush(); flush(); but in browser I don't see 'Testing connection handling in PHP'...How could i solve this problem?
  12. For Christian F.: How could i flush the output? Could u show me the code? Thank u!
  13. Sure that I have read the php manual, but I have some problems. For exemple in this script from here http://php.net/manual/en/function.ignore-user-abort.php: <?php // Ignore user aborts and allow the script // to run forever ignore_user_abort(true); set_time_limit(0); echo 'Testing connection handling in PHP'; // Run a pointless loop that sometime // hopefully will make us click away from // page or click the "Stop" button. while(1) { // Did the connection fail? if(connection_status() != CONNECTION_NORMAL) { break; } // Sleep for 10 seconds sleep(10); } // If this is reached, then the 'break' // was triggered from inside the while loop // So here we can log, or perform any other tasks // we need without actually being dependent on the // browser. ?> If I run this script I can't see the message 'Testing connection handling in PHP'. in fact the script is running without ptrint any message. You can see here: http://ionutspot.uhostall.com/1.php And if i delete ignore_user_abort(true); set_time_limit(0); the script will make the same thing like on the page http://ionutspot.uhostall.com/1.php So i hope that you understood me, i can't understand how could i use ignore_user_abort....
  14. Could you give me an example with ignore_user_abort() ? Thank you!
  15. 1. What is tinyint(4)? 2. Is 4 the number of digits? 3. Could you tell me the diference between tinyint(4) and tinyint(3)? 4. Is it possible to have tinyint(7) ? Thank u very much!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.