Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

php function not working correctly

Featured Replies

ah yes a lot of problems today but a lot of fixes as well.

 

Anyway at this problem the function is not getting mine css correctly.

 

take a look hier www.dm-kensha/index2.php

 

The code;

<?php

function includeDocName()

{

include("top.php");

include("bot.php");

}

 

print includeDocName();

?>

do I miss something as a reason why it doesn't work correctly?

ah yes a lot of problems today but a lot of fixes as well.

 

Anyway at this problem the function is not getting mine css correctly.

 

take a look hier www.dm-kensha/index2.php

 

The code;

<?php

function includeDocName()

{

include("top.php");

include("bot.php");

}

 

print includeDocName();

?>

do I miss something as a reason why it doesn't work correctly?

 

first of all the link was wrong,

 

i dont get the point of putting your includes inside a function and then simply printing the function straight after ?

 

i take it that the contents are in the files top and bot.php and your just including them into the index.php

 

the best way to do this is put your main html in index.php and where the content needs to go, then chose to display the appropriate file by something like

 

if($_GET['page']=="home") {
include("home.php");
}

 

obviously basically repeat that using the else keyword for each individual page

it's not? assuming it was .com on the link I see main.css being loaded

ah yes a lot of problems today but a lot of fixes as well.

 

Anyway at this problem the function is not getting mine css correctly.

 

take a look hier www.dm-kensha/index2.php

 

The code;

<?php

function includeDocName()

{

include("top.php");

include("bot.php");

}

 

print includeDocName();

?>

do I miss something as a reason why it doesn't work correctly?

 

Thats a waste of a function to just hold ur includes :rolleyes:

  • Author

Was thinking the same of by right now.

 

Anway, currently brainstorming on how the file name would be replaced once the user clicks on the submit button.

I found these 2 functions in the filesystem and string.

rename("","")and str_ireplace("","","")

Don't tell me how to do it I like to figure it out.

Was thinking the same of by right now.

 

Anway, currently brainstorming on how the file name would be replaced once the user clicks on the submit button.

I found these 2 functions in the filesystem and string.

rename("","")and str_ireplace("","","")

Don't tell me how to do it I like to figure it out.

I'd start with the rename function it does what it suggest, renames files and directories

  • Author

I just forgot to add the !DOCTYPE on the test document that´s all.

 

Oh well still thinking on how to change stuff here.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.