Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About FreeBenzine

  • Rank
  1. Hi, I am developing a php-mysql website hosted in an apache. The site is down since yesterday for my IP address, whereas it is visible elsewhere. The web hosting company said they do not see any problems and my IP is not blocked by them. The problem has occured before and was solved by itself after a few days. I simply do not understand the reason behind it. Annoying as I have to stop working on the site till it is restored. Please help. Cheers.
  2. How can I explode the following string: The first "baby boy" was naughtly,cute into array("The", "first", "baby boy", "was", "naughty", "cute") So that the text in quotation is treated as a single word. In addition I would like to split on commas and spaces.
  3. Hi, I am working on a script to allow anonymous users to upload files. I started with this simple code, which sadly I cannot make to work: <?php $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['Upfile']['name']); if (move_uploaded_file($_FILES['Upfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "File uploading failed.\n"; } ?> The corresponding form is: <form name="upload" action="Upload.php" method="POST" ENCTYPE="multipart/formdata"> Select the file to upload: <input
  4. Thanks. I called the file MyVar.inc.php containing my variables as: <title> <?php include ("CSS/MyVar.inc.php"); echo $Page4_2Title; ?> </title> but sadly I cannot get the php variables in subsequent lines of the same index.php. Am I making any mistake?
  5. Hi, My index.php consists of several Includes associated with several DIVs and each Include file is a php file located at a sub-folder. Typically an include file looks like: <div id="CentralDiv"> <?php include ("Research/Publication/MainDIV/IncludeMain.php"); ?> </div> <div id="RightDiv"> <?php include ("Research/Publication/RightDIV/IncludeRight.php"); ?> </div> <div id="FooterDiv"> <?php
  6. Thanks, but I still have a few questions. 1. About index.php: You are absolutely right that there is no point using 'IncludeMain.php' as this page is not going to be included anywhere else. I will correct that. I am still curious about your comment: "Personally, I wouldn't code the site the way you have above in sample #1". As I am a beginner I would like to know what alternative I can do. 2. When all subpages are index.php (each with an include menu.php) then each time a page is loaded the menu.php is re-loaded (I think). Is it not a bad design? 3. Thanks for the codes for active m
  7. I am developing a website using PhP includes. Each folder and sub-folder pages are ‘index.php’ with the following structure: <div id="container"> <div id="TopDiv"> <?php include ("TopDIV/IncludeTop.php"); ?> <div id="NavigationDiv"> <?php include ("Menu/IncludeMenu.php"); ?> </div> <div id="CentralDiv"> <?php include ("MainDIV/IncludeMain.php");
  8. Hi, Certainly I have the index.php file in the folder. For example, in the folder for the file /news/index.php the link is to /news/. And of course the folder contains the file index.php file. I have configured to have index.php as the default page. Everything works fine as long as the links are made to the index file; for example, /news/index.php. If the link is made to /news/ then it does not work. My original post says that 'redirect' to remove index.php/index.html works but still the links are basically to the index.php file. The extension of the URL can also be seen when the mouse
  9. Sorry I came back to the issue again as I could not resolve it! As newseed suggested I removed 'index.php' from the navigation links (For example, from /news/index.php to /news/) but I receive 403 error. How could I remove index.php from my URL ?(I would also like to remove it from the links so that when the mouse hovers the viewer does not see the 'index.php' part). Cheers
  10. Thanks a lot everyone for the support, getting addicted this site. I'm moving ahead with php.
  11. Hi, I have several DIV elements and I am mainly calling html includes inside the DIV elements. In some occasions I need to use php includes in some DIVs. Here is my index file, I hope that it is understandable. Comments will be welcome. The index file when saved as shtml works fine as long as there are only html includes. If I have php includes it does not work. Changing the extension to php allows the php include to work but the html includes do not work. Any suggestions will appreciated. Thanks in advance. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4
  12. Changing the file extension to xxx.php helps in invoking the php include but the html includes (e.g. the menu) do not work. Any solutions?
  13. Hello, My page has several html includes. The index page with html does not work, and had to be made shtml to work. Now i need to include php inside a DIV of the shtml file. The include php works quite ok with html but fails with shtml. Could you kindly give me advice how to include php inside a DIV of shtml? Tim
  14. HI, 1. In order to remove the index.html from my URLs I used the following code: RewriteEngine on RewriteCond %{THE_REQUEST} \/index\.(php|html)\ HTTP [NC] RewriteRule (.*)index\.(php|html)$ /$1 [R=301,L] While it works ok for the home page it results a 403 page for sub-directory index.html pages. Could you kindly provide some solutions? 2. With the above-mentioned approach I can still see the URL with the index.html in the address bar for a few seconds before it is redirected. I can also see the complete link with the html extension when the mouse hovers on a link. Is there a way
  15. Hi, the problem is solved now. I forgot really to start with the DOC type. You guys are really great. Thanks once again.
  • Create New...