*jancis38* Posted December 3, 2007 Report Share Posted December 3, 2007 Vai kāds nevar pastāstīt, kā ar php skripta palīdzību, uztaisīt jaunu failu (*.php *.txt etc.) itkā papētīju php.net'ā bet neko jēdzīgu neatradu.. Link to comment Share on other sites More sharing options...
Kristabs Posted December 3, 2007 Report Share Posted December 3, 2007 Definē "jēdzīgs" :) http://lv2.php.net/fwrite Link to comment Share on other sites More sharing options...
*jancis38* Posted December 3, 2007 Author Report Share Posted December 3, 2007 (edited) opā, liels paldies, nemaz neidomājos. :) editēts: labi, un kā varētu ar php skriptu uztaisīt jaunu folderi.? Edited December 3, 2007 by *jancis38* Link to comment Share on other sites More sharing options...
gurkjis Posted December 4, 2007 Report Share Posted December 4, 2007 php funkcija mkdir() ja nezini funkcijas nosaukumu, tad googlē ieraksti vajadzīgās funkcijas keywordus, šajā gadījumā tie ir "php create directory" http://www.google.lv/search?hl=lv&q=ph...A1ana&meta= Link to comment Share on other sites More sharing options...
*jancis38* Posted December 4, 2007 Author Report Share Posted December 4, 2007 liels jums paldies, vis izdevās. :) Link to comment Share on other sites More sharing options...
*jancis38* Posted December 4, 2007 Author Report Share Posted December 4, 2007 (edited) vai ir iespējams lai pie mapes taisīšanas, kad jau ir 1 mape, izmetas kļūda ar paziņojumu, ka šāda mape jau ir izveidota.? ah atvainojos, jau šāda kļūda izlec. :) Edited December 4, 2007 by *jancis38* Link to comment Share on other sites More sharing options...
andrisp Posted December 4, 2007 Report Share Posted December 4, 2007 Iemācies meklēt pa manuāli: http://lv.php.net/manual/en/ref.filesystem.php Konkrētāk: http://lv.php.net/manual/en/function.file-exists.php Link to comment Share on other sites More sharing options...
*jancis38* Posted December 4, 2007 Author Report Share Posted December 4, 2007 itkā papētīju bet man nesanāca.. kas man būtu jāpieraksta šeit: mkdir ("../fails",0755); lai pieņemsim viņš atpazīst mkdir kā $filename itkā mēģināju ar as bet nesanāca.. Link to comment Share on other sites More sharing options...
andrisp Posted December 4, 2007 Report Share Posted December 4, 2007 Nesapratu. Ko tu tur gribi izdarīt ? Link to comment Share on other sites More sharing options...
*jancis38* Posted December 4, 2007 Author Report Share Posted December 4, 2007 nu lai izmetas normāls errors, par to ka jau tāds folderis pastāv. lai nerādas: Warning: mkdir() [function.mkdir]: File exists in C:\Web\www\test.php on line 2 Link to comment Share on other sites More sharing options...
andrisp Posted December 4, 2007 Report Share Posted December 4, 2007 Ar file_exists pārbaudi vispirms. Link to comment Share on other sites More sharing options...
*jancis38* Posted December 4, 2007 Author Report Share Posted December 4, 2007 nu es sapratu ka ar to, bet kā lai to mkdir viņš saprot kā $filename if (file_exists($filename)) { echo "Fails pastāv."; } Link to comment Share on other sites More sharing options...
andrisp Posted December 4, 2007 Report Share Posted December 4, 2007 Nesaprotu, ko tu esi tur iedomājies, bet šādi: if (file_exists($filename)) { echo "Fails pastāv."; } else { mkdir($filename); } Link to comment Share on other sites More sharing options...
*jancis38* Posted December 4, 2007 Author Report Share Posted December 4, 2007 da nekas nesanāk, tāds arī errors rādās. :( Warning: mkdir() [function.mkdir]: File exists in C:\Web\www\test.php on line 3 Link to comment Share on other sites More sharing options...
andrisp Posted December 4, 2007 Report Share Posted December 4, 2007 Parādi pilnu kodu. Link to comment Share on other sites More sharing options...
Recommended Posts