
FreeBenzine
Member-
Content Count
20 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Downloads
Gallery
Store
Everything posted by FreeBenzine
-
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.
-
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.
-
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
-
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?
-
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
-
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
-
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");
-
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
-
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
-
Thanks a lot everyone for the support, getting addicted this site. I'm moving ahead with php.
-
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
-
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?
-
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
-
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
-
Hi, the problem is solved now. I forgot really to start with the DOC type. You guys are really great. Thanks once again.
-
I am using IE ver 8. 'Check to make sure you have a DocType to the top of your page.' was not really clear. Cheers
-
Hello, I used http://www.csstutorial.net/2010/02/how-to-create-a-center-aligned-page-with-css/ to align my webpages to the centre. It works fine with Firefox and Chrome, but does not work with IE. Any tips will be highly appreciated. Cheers, Tim
-
What should I use to replace frames?
FreeBenzine replied to FreeBenzine's topic in Beginners Web Design
Thanks a lot everyone who contributed, but sadly I could not solve my problem - due to my ignorance. let me repeat my problem. I have three columns - each column for one html page and I used before frames. Now I want to get rid of frames and I understood that I can use php includes to do the job. Still it is not clear to me how can I combine the three html files using the php includes. Cheers, Tim -
What should I use to replace frames?
FreeBenzine replied to FreeBenzine's topic in Beginners Web Design
Thanks. Is there an example with a php code to demonstrate the kind of job I'm aiming at? That'll be great. Tim -
Hello, I am new to web design. I'm using DreamWeaver and initially I used frames. The simple reason was that I wanted to keep the right column of my webpages separate from the rest of the webpages so that if needed i could change that column easily. As using a frame is really out-of-fashion what should I use? Should I use some server-side scripts to generate the right column of the web pages. Should it with php? Any tips will be highly appreciated. Cheers, Tim