help with file
hello, i want to make log stock. i Tried make this but this doesnt work :( help pls
PHP Code:
|
Re: help with file
While a+ creates files it doesn't create folders. You'll have to use dir_exists() to check if the folder exists and use mkdir() to create it otherwise.
It's also bad to hardcode paths. You should really use get_localinfo along with "amxx_datadir". You should also include a failsafe, just in case. if ( ! file_index ) return; Since you don't use the returned value you don't need to return 0 at the end. You can remove it or just leave it at "return", the result will be the same either way. |
Re: help with file
Try this:
PHP Code:
|
Re: help with file
FIXED! Thanx Black Rose a LOT!
PHP Code:
|
Re: help with file
SpaWn2KiLl, :D :D you were late :D
|
Re: help with file
Quote:
|
Re: help with file
Quote:
Quote:
const file[] is never used because you use the hardcoded variable g_constLogDirectory[] instead. And again, you really should use "amxx_datadir", because some people actually moves it. Do you want me to write the whole code? |
| All times are GMT -4. The time now is 19:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.