Jump to content
php.lv forumi

Uz servera strādā bet uz localhosta nē..moš php.ini pie vainas?


Cibiņš

Recommended Posts

Es arī tā visu laiku domāju, taču uz viena hosta man rel linki ar"/" sākumā neņēma, bet toties kā ./../ paejot ārā uz root ņēma normāli stilus.

Tur jau tas joks, pats nezinu kāpēc tā. Es jau arī uzskatīju, ka ar "/" pietiek, bet nešancēja.

Link to comment
Share on other sites

Vispār jau drošvien biji domājis:

$path = dirname(__FILE__);
$root = $_SERVER['DOCUMENT_ROOT'];

$external_path = str_replace( $root , '' , $path );

define("FPATH", $external_path);

 

Vai kaut ko tādā stilā.

Un protams ir jau arī vēl <base>.

 

Bet tie visi ir bugfix'i priekš līka risinājuma, kurš uztaisīts problēma, kuru kāds nebija spējīg pareizi nodefinēt.

Pointless...

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...