Jump to content
php.lv forumi

errori?


yeahz

Recommended Posts

Parse error: syntax error, unexpected T_VARIABLE in .../item.php on line 1

<?php

 

Te ar:

Parse error: syntax error, unexpected '{' in .../contacts.php on line 1

<?php

 

uz mana datora viss ok, uz nano.lv pārliku un errori pilns. Kas par vainu?

Edited by yeahz
Link to comment
Share on other sites


index.php ($config['switch_folder'] = "switch")

<?php
include("header.php");


if (!isset($_GET['page'])) {
include($config['switch_folder'] . "/index.php");
} else {
if (file_exists($config['switch_folder'] . "/$_GET

.php"))
	include($config['switch_folder'] . "/$_GET

.php");
else
	include($config['switch_folder'] . "/404.php");
}

include("footer.php");
?>

 

htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/?$ /index.php?page=$1 [QSA,L] # main config

 

Rekur ir, viss notiek caur index.php un htaccessu.

PS sākumlapa (switch/index.php) inklūdojas labi.

Link to comment
Share on other sites

kolosāli, kāpēc pārmetot failus viņiem viss teksts pāriet vienā rindiņā? izmantoju filezilla.

 

UP!

problēma atrisināta, pie pārsūtīšanas bija jāizmanto Režīms: Binārs, nevis ASCII

iesaku izmantot require vai require_once :) tada veida ir drosak :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...